1

I created a Ubuntu Vagrant box and ssh'd into it.

Now, created a ssh key and trying to ssh to my localhost but I get the following error.

vagrant@vagrant-ubuntu-trusty-64:~$ ssh -vvvv localhost 
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: connect to address 127.0.0.1 port 22: Connection refused
ssh: connect to host localhost port 22: Connection refused

When I check the list of ports opened as follows:

vagrant@vagrant-ubuntu-trusty-64:~$ sudo netstat -tulpn|grep 22
tcp        0      0 10.0.2.15:22            0.0.0.0:*               
LISTEN      11598/sshd

I see the ip address as 10.0.2.15:22. Also, my sshd service is running as well.

vagrant@vagrant-ubuntu-trusty-64:~$ ps aux|grep ssh
root     11430  0.0  0.7  68084  3688 ?        Ss   17:41   0:00 sshd: vagrant [priv]
vagrant  11432  0.0  0.3  68216  1908 ?        S    17:41   0:00 sshd: vagrant@pts/0 
root     11598  0.0  0.6  61388  3060 ?        Ss   17:44   0:00 /usr/sbin/sshd -D

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.