Eu não entendo exatamente o seu problema, mas posso sugerir este vídeo. link Eu segui estes passos e eu sucesso para entrar no meu servidor windows 7 ssh.
O Ip do Ubuntu é 10.0.2.15 (obtido por 'ifconfig'), mas parece ser 169.254.107.82 (obtido pela Rede VirtualBox Host-Only) .....
E no Cmd do Windows, eu não consigo pingar para 10.0.2.15, mas posso pingar para 169.254.107.82.
No Ubuntu, posso pingar para 192.168.1.104 e fazer o login por 'ssh'. Ip do Windows é 192.168.1.104. @Mitesh obrigado! Na máquina Window7, eu instalei o copssh e o Ubuntu (ele está no vitrualbox).
Quando eu uso o copssh para logar no meu Ubuntu, aparece algum erro:
$ ssh [email protected]
warning:Permanerntly added '169.254.107.82' <ECDSA> to the list of know host.
Permission denied <keyborad-interactive>.
No ubuntu, o arquivo de / etc / ssh / sshd_config é o seguinte:
# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes
# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768
# Logging
SyslogFacility AUTH
LogLevel INFO
# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys
# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes
# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no
# Change to no to disable tunnelled clear text passwords
PasswordAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
#MaxStartups 10:30:60
#Banner /etc/issue.net
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
UsePAM yes
Antes de mais nada, verifique seu endereço IP do VM Ubuntu OS (ifconfig). verifique o IP atribuído ao seu VM OS tem os mesmos endereços do grupo de Ip, suponha que no seu caso o seu IP da VM seja 192.168.1.103 e verifique o seu IP da máquina (da sua tentativa de conexão) se eles possuírem um grupo de IP diferente (192.168.0.0 - OU 10.0.0.0 -). Porque algumas janelas de tempo criam seu NAT e um grupo de LAN separado.
então se for, então você precisa mudar isso.