I installed Linux Mint 17 on my Virtualbox, and I want to access files in it.

I installed openssh-client and openssh-server by the following command:

sudo apt-get install ssh

Then I tried ssh localhost by "ssh" and it shows the following:

Welcome to Linux Mint 17 Qiana (GNU/Linux 3.13.0-24-generic x86_64)

Welcome to Linux Mint
 * Documentation:  http://www.linuxmint.com
Last login: Fri Jun 27 13:18:53 2014 from localhost

I considered it as ssh successful from localhost. Then I tried to ssh from outside the Virtualbox.

I modified the network setting of the Linux virtual machine as follows:

The VM network card is appended to "NAT"

Port transfer set as "Rule1","TCP","","9023","","22"

Note: The corresponding fields are "name", "protocol", "host IP", "host port", "client IP", "client port"

Then I tried to connect to the Mint OS from Windows by FileZilla:

Host: my host IP address

User Name: my user name

Password: my password

Port: 9023

and the console showed that:

Status: Connecting to x.x.x.x:9023..
Status: Connection established, waiting for Welcome message..
Error: Can't connect to server

Then I tried to use "putty" to connect, but the putty console didn't show anything.

It seems the Virtualbox port transfer mechanism didn't work (since I could ssh to localhost in my Mint machine so I don't think it's the problem of the ssh I installed.) The port transfer mechanism worked well with my Ubuntu machines. I don't know why it doesn't work for Linux Mint.

Can anyone give me a suggestion? Thank you in advance.


Thank you so much guys! This problem was solved by updating my Virtualbox. Here are the two settings I ran successfully:

1) NAT

Append interface of my VM( to NAT, and set the port forwarding rule as following:

Port transfer set as "Rule1", "TCP", "", "9025", "", "22"

Then I can ssh my VM ( from outside Virtualbox by

open"putty" in Windows and set SSH connection with my PC's public IP and port 9025

2) NAT-Network

Create a NAT-Network:


Port transfer set as "Rule1", "TCP", "", "9023", "", "22" and "Rule2", "TCP", "", "9024", "", "22"

Then Append two virtual machines (guest OS) to NAT-Network (Their IPs are and respectively)

Now the two machines can ping each other successfully, and they can access each other by (taking as an example)

ssh username@

I can also ssh my VM ( from outside Virtualbox by

open"putty" in Windows and set SSH connection with my PC's public IP and port 9024

  • 2
    are you able to ping to you'r virtual machine. And It should be asked in supberuser?.
    – smali
    Jun 27, 2014 at 6:06
  • No. I was not able to ping my VM when its interface was appended to NAT. Jun 27, 2014 at 11:30

2 Answers 2


Chech if you did install openssh-server server .

sudo apt-get install openssh-server

then check you have proper port enabled

/etc/ssh/sshd_config if you go in it with different port number from outside or your router has a rule of forwarding it to another port

you may also need to uncomment in there if you want to be authorized by password.

#PasswordAuthentication yes


You have to configure two network interfaces on the guest OS. One for guest to host communication and other for guest to internet.

Please refer to this tutorial on virtualbox forums.

  • No problems. I usually do not use NAT mode when using virtualbox. I use bridged adapter which brings the guest and host on the same network, as both query my WLAN Router's DHCP server.
    – linud
    Jun 27, 2014 at 17:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.