Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running two OSes, one (Backtrack 5) as a guest in VirtualBox and the other (Ubuntu 13.04) as the host. Now when I connect to my host through ssh (host-only connection):

$ ssh 198.168.*.* -vvv

I'm prompted for a password and when I enter the password I get the following error occurs:

debug3: packet_send2: adding 64 (len 58 padlen 6 extra_pad 64)
debug2: we sent a password packet, wait for reply
debug3: Wrote 144 bytes for a total of 1271
debug1: Authentications that can continue: publickey,password
Permission denied, please try again.

I've tried it again and again so I know that my password isn't wrong. On my host machine when I type:

$ ssh localhost

it connects normally after typing the password, but when I issue this on guest it says:

Read from socket failed: Connection reset by peer
Connection closed by UNKNOWN

What is the problem?

edit: the first of my problem was I was trying

ssh ip

but it should be

ssh username@ip

cant connect to host though. Its refusing the connection

share|improve this question
if possible, also post messages of auth.log and syslog – Rahul Patil Jul 10 '13 at 9:26
Does anything appear in the logs on the server (/var/log/auth.log)? What do you have in the server configuration: /etc/ssh/sshd_config? Is there a firewall on the guest or on the host? What kind of network do you have in the VM (bridge, NAT, host-only) — can you connect from the guest to the host at all? – Gilles Jul 10 '13 at 14:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.