A
A
Alexander2017-01-09 11:40:24
linux
Alexander, 2017-01-09 11:40:24

How to set up SSH in VirtualBox?

Unable to connect to the virtual machine via SSH. Gives this error

SSH_MSG_DISCONNECT: 2 Too many authentication failures

  • Host Machine: Win10
  • Guest: Ubuntu 16.04
  • To connect to the guest machine via SSH using phpStorm

What I've done:
  1. In the VB settings in "Network Settings" set "Virtual Host Adapter"
  2. Installed sudo apt-get install ssh on the virtual machine
  3. Then on the virtual machine through ifconfig I looked inet addr: 192.168.56.101
  4. I went into /etc/ssh/sshd_config, looked at Port 1111. To check, I enabled PasswordAuthentication yes; PermitEmptyPasswords yes; PubkeyAuthentication no
  5. Then, on my host machine in phpStorm, I pressed "start SSH session..." and entered the data:
    host: 192.168.56.101, port: 1111,
    user name: win (here I don't know what to enter),
    the password field was left empty

Issues
SSH_MSG_DISCONNECT: 2 Too many authentication failures

What am I doing wrong? Maybe an error in the username? But I don't understand where to set it, just like the password

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Satisfied IT, 2017-01-09
@Dredder

When installing ubunta, you created a user and specified a password for him, so in the user name you specify this user or root, and in the password - the password of this user, which was entered during the installation of ubunta

G
GavriKos, 2017-01-09
@GavriKos

The username is the user you want to start the SSH session as. Naturally the user of OS-and on a virtualka.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question