How to remotely access a ubuntu server on a virtual machine?
New user here, I'm using Windows 10 and I want to access my Ubuntu Server that is in a virtual machine on the same computer. I'm trying to use puTTY and, by ssh, putting the server IP but without success.
I'm using VirtualBox, configured in NAT. By nmap localhost
it says ssh service is open.
Can somebody help me?
16.04 server virtualbox windows-10
add a comment |
New user here, I'm using Windows 10 and I want to access my Ubuntu Server that is in a virtual machine on the same computer. I'm trying to use puTTY and, by ssh, putting the server IP but without success.
I'm using VirtualBox, configured in NAT. By nmap localhost
it says ssh service is open.
Can somebody help me?
16.04 server virtualbox windows-10
1
Hi Lorena! Welcome to AskUbuntu! We're going to need a bit more information. What virtual environment are you using? Have you configured the virtual network in NAT, bridge, host, or local mode? How have you tested that the ssh port is open? Please include the commands you ran and the output of those commands so we can see. Thanks! :-)
– tudor
Oct 10 '18 at 3:53
What setting is the virtual network adapter at? Is it on NAT or Bridged? If you set it on Bridged, it gets a dedicated IP address from DHCP and you can ssh it directly to it using that address.
– bomberb17
Oct 10 '18 at 3:55
What settings have you put into Preferences -> Network -> NAT Network -> Properties and "Port Forwarding"? Are you able to put in a screenshot of these two windows into your question?
– tudor
Oct 10 '18 at 5:32
add a comment |
New user here, I'm using Windows 10 and I want to access my Ubuntu Server that is in a virtual machine on the same computer. I'm trying to use puTTY and, by ssh, putting the server IP but without success.
I'm using VirtualBox, configured in NAT. By nmap localhost
it says ssh service is open.
Can somebody help me?
16.04 server virtualbox windows-10
New user here, I'm using Windows 10 and I want to access my Ubuntu Server that is in a virtual machine on the same computer. I'm trying to use puTTY and, by ssh, putting the server IP but without success.
I'm using VirtualBox, configured in NAT. By nmap localhost
it says ssh service is open.
Can somebody help me?
16.04 server virtualbox windows-10
16.04 server virtualbox windows-10
edited Oct 10 '18 at 4:19
Lorena Tavares
asked Oct 10 '18 at 3:45
Lorena TavaresLorena Tavares
225
225
1
Hi Lorena! Welcome to AskUbuntu! We're going to need a bit more information. What virtual environment are you using? Have you configured the virtual network in NAT, bridge, host, or local mode? How have you tested that the ssh port is open? Please include the commands you ran and the output of those commands so we can see. Thanks! :-)
– tudor
Oct 10 '18 at 3:53
What setting is the virtual network adapter at? Is it on NAT or Bridged? If you set it on Bridged, it gets a dedicated IP address from DHCP and you can ssh it directly to it using that address.
– bomberb17
Oct 10 '18 at 3:55
What settings have you put into Preferences -> Network -> NAT Network -> Properties and "Port Forwarding"? Are you able to put in a screenshot of these two windows into your question?
– tudor
Oct 10 '18 at 5:32
add a comment |
1
Hi Lorena! Welcome to AskUbuntu! We're going to need a bit more information. What virtual environment are you using? Have you configured the virtual network in NAT, bridge, host, or local mode? How have you tested that the ssh port is open? Please include the commands you ran and the output of those commands so we can see. Thanks! :-)
– tudor
Oct 10 '18 at 3:53
What setting is the virtual network adapter at? Is it on NAT or Bridged? If you set it on Bridged, it gets a dedicated IP address from DHCP and you can ssh it directly to it using that address.
– bomberb17
Oct 10 '18 at 3:55
What settings have you put into Preferences -> Network -> NAT Network -> Properties and "Port Forwarding"? Are you able to put in a screenshot of these two windows into your question?
– tudor
Oct 10 '18 at 5:32
1
1
Hi Lorena! Welcome to AskUbuntu! We're going to need a bit more information. What virtual environment are you using? Have you configured the virtual network in NAT, bridge, host, or local mode? How have you tested that the ssh port is open? Please include the commands you ran and the output of those commands so we can see. Thanks! :-)
– tudor
Oct 10 '18 at 3:53
Hi Lorena! Welcome to AskUbuntu! We're going to need a bit more information. What virtual environment are you using? Have you configured the virtual network in NAT, bridge, host, or local mode? How have you tested that the ssh port is open? Please include the commands you ran and the output of those commands so we can see. Thanks! :-)
– tudor
Oct 10 '18 at 3:53
What setting is the virtual network adapter at? Is it on NAT or Bridged? If you set it on Bridged, it gets a dedicated IP address from DHCP and you can ssh it directly to it using that address.
– bomberb17
Oct 10 '18 at 3:55
What setting is the virtual network adapter at? Is it on NAT or Bridged? If you set it on Bridged, it gets a dedicated IP address from DHCP and you can ssh it directly to it using that address.
– bomberb17
Oct 10 '18 at 3:55
What settings have you put into Preferences -> Network -> NAT Network -> Properties and "Port Forwarding"? Are you able to put in a screenshot of these two windows into your question?
– tudor
Oct 10 '18 at 5:32
What settings have you put into Preferences -> Network -> NAT Network -> Properties and "Port Forwarding"? Are you able to put in a screenshot of these two windows into your question?
– tudor
Oct 10 '18 at 5:32
add a comment |
1 Answer
1
active
oldest
votes
I struggled with this until recently, where I found a long-term solution where I could pernamently save my connection settings in PuTTY and WinTCP for convenience.
Personally, I have configured my VirtualBox machine to use two networks:
- NAT for access to the internet
- Host-Only Adapter to communicate with the VM via PuTTY and WinSCP
In the VirtualBox Manager, I've made just one change to the "VirtualBox Host-Only Ethernet Adaptor" - disabling the DHCP server. By default this should leave you with a configuration like this, assuming the IP address defaults haven't been changed.
Within the virtual machine itself, you need to do two things:
- Set your IPv4 address for this host-only network manually to
192.168.56.10
, subnet of192.168.56.0/24
, and no setting for other components where applicable (i.e. gateway). - Ensure that
openssh-server
is installed and running. Usesudo service ssh status
to check if its installed and running. - Check that your firewall is either disabled or (preferably) enabled and configured to allow for ssh connections. If you are using ufw you can allow ssh connections via
sudo ufw allow ssh
.
From here, running PuTTY on your host Windows 10 system should only require you to access the IP address 192.168.56.10
via ssh on port 22, like so. Hope this helps!
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1082475%2fhow-to-remotely-access-a-ubuntu-server-on-a-virtual-machine%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I struggled with this until recently, where I found a long-term solution where I could pernamently save my connection settings in PuTTY and WinTCP for convenience.
Personally, I have configured my VirtualBox machine to use two networks:
- NAT for access to the internet
- Host-Only Adapter to communicate with the VM via PuTTY and WinSCP
In the VirtualBox Manager, I've made just one change to the "VirtualBox Host-Only Ethernet Adaptor" - disabling the DHCP server. By default this should leave you with a configuration like this, assuming the IP address defaults haven't been changed.
Within the virtual machine itself, you need to do two things:
- Set your IPv4 address for this host-only network manually to
192.168.56.10
, subnet of192.168.56.0/24
, and no setting for other components where applicable (i.e. gateway). - Ensure that
openssh-server
is installed and running. Usesudo service ssh status
to check if its installed and running. - Check that your firewall is either disabled or (preferably) enabled and configured to allow for ssh connections. If you are using ufw you can allow ssh connections via
sudo ufw allow ssh
.
From here, running PuTTY on your host Windows 10 system should only require you to access the IP address 192.168.56.10
via ssh on port 22, like so. Hope this helps!
add a comment |
I struggled with this until recently, where I found a long-term solution where I could pernamently save my connection settings in PuTTY and WinTCP for convenience.
Personally, I have configured my VirtualBox machine to use two networks:
- NAT for access to the internet
- Host-Only Adapter to communicate with the VM via PuTTY and WinSCP
In the VirtualBox Manager, I've made just one change to the "VirtualBox Host-Only Ethernet Adaptor" - disabling the DHCP server. By default this should leave you with a configuration like this, assuming the IP address defaults haven't been changed.
Within the virtual machine itself, you need to do two things:
- Set your IPv4 address for this host-only network manually to
192.168.56.10
, subnet of192.168.56.0/24
, and no setting for other components where applicable (i.e. gateway). - Ensure that
openssh-server
is installed and running. Usesudo service ssh status
to check if its installed and running. - Check that your firewall is either disabled or (preferably) enabled and configured to allow for ssh connections. If you are using ufw you can allow ssh connections via
sudo ufw allow ssh
.
From here, running PuTTY on your host Windows 10 system should only require you to access the IP address 192.168.56.10
via ssh on port 22, like so. Hope this helps!
add a comment |
I struggled with this until recently, where I found a long-term solution where I could pernamently save my connection settings in PuTTY and WinTCP for convenience.
Personally, I have configured my VirtualBox machine to use two networks:
- NAT for access to the internet
- Host-Only Adapter to communicate with the VM via PuTTY and WinSCP
In the VirtualBox Manager, I've made just one change to the "VirtualBox Host-Only Ethernet Adaptor" - disabling the DHCP server. By default this should leave you with a configuration like this, assuming the IP address defaults haven't been changed.
Within the virtual machine itself, you need to do two things:
- Set your IPv4 address for this host-only network manually to
192.168.56.10
, subnet of192.168.56.0/24
, and no setting for other components where applicable (i.e. gateway). - Ensure that
openssh-server
is installed and running. Usesudo service ssh status
to check if its installed and running. - Check that your firewall is either disabled or (preferably) enabled and configured to allow for ssh connections. If you are using ufw you can allow ssh connections via
sudo ufw allow ssh
.
From here, running PuTTY on your host Windows 10 system should only require you to access the IP address 192.168.56.10
via ssh on port 22, like so. Hope this helps!
I struggled with this until recently, where I found a long-term solution where I could pernamently save my connection settings in PuTTY and WinTCP for convenience.
Personally, I have configured my VirtualBox machine to use two networks:
- NAT for access to the internet
- Host-Only Adapter to communicate with the VM via PuTTY and WinSCP
In the VirtualBox Manager, I've made just one change to the "VirtualBox Host-Only Ethernet Adaptor" - disabling the DHCP server. By default this should leave you with a configuration like this, assuming the IP address defaults haven't been changed.
Within the virtual machine itself, you need to do two things:
- Set your IPv4 address for this host-only network manually to
192.168.56.10
, subnet of192.168.56.0/24
, and no setting for other components where applicable (i.e. gateway). - Ensure that
openssh-server
is installed and running. Usesudo service ssh status
to check if its installed and running. - Check that your firewall is either disabled or (preferably) enabled and configured to allow for ssh connections. If you are using ufw you can allow ssh connections via
sudo ufw allow ssh
.
From here, running PuTTY on your host Windows 10 system should only require you to access the IP address 192.168.56.10
via ssh on port 22, like so. Hope this helps!
edited Oct 10 '18 at 5:35
answered Oct 10 '18 at 5:26
wvDevwvDev
464
464
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1082475%2fhow-to-remotely-access-a-ubuntu-server-on-a-virtual-machine%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Hi Lorena! Welcome to AskUbuntu! We're going to need a bit more information. What virtual environment are you using? Have you configured the virtual network in NAT, bridge, host, or local mode? How have you tested that the ssh port is open? Please include the commands you ran and the output of those commands so we can see. Thanks! :-)
– tudor
Oct 10 '18 at 3:53
What setting is the virtual network adapter at? Is it on NAT or Bridged? If you set it on Bridged, it gets a dedicated IP address from DHCP and you can ssh it directly to it using that address.
– bomberb17
Oct 10 '18 at 3:55
What settings have you put into Preferences -> Network -> NAT Network -> Properties and "Port Forwarding"? Are you able to put in a screenshot of these two windows into your question?
– tudor
Oct 10 '18 at 5:32