在 Window7 机器上使用 copssh 登录 Ubuntu(位于 vm box 中)

在 Window7 机器上使用 copssh 登录 Ubuntu(位于 vm box 中)

Ubuntu 的 IP 是 10.0.2.15(通过“ifconfig”获取),但它似乎是 169.254.107.82(通过 VirtualBox Host-Only Network 获取).....

而在Windows的Cmd中,我无法ping通10.0.2.15,但可以ping通169.254.107.82。

在 Ubuntu 中,我可以 ping 到 192.168.1.104,并通过“ssh”登录。Windows 的 IP 是 192.168.1.104。@Mitesh 谢谢!在 Window7 机器上,我安装了 copssh 和 Ubuntu(它在 vitrualbox 中)。

当我使用 copssh 登录我的 ubuntu 时出现一些错误:

$ ssh [email protected]
warning:Permanerntly added '169.254.107.82' <ECDSA> to the list of know host.
Permission denied <keyborad-interactive>.

在ubuntu中,/etc/ssh/sshd_config文件如下:

# 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

答案1

我不太明白你的问题,但我可以推荐这个视频。 http://www.youtube.com/watch?v=DHAEsUL6rsw 我按照以下步骤操作,成功登录了我的 Windows 7 ssh 服务器。

答案2

首先检查您的 VM Ubuntu OS IP 地址(ifconfig)。检查分配给您的 VM OS 的 IP 是否具有相同的 IP 组地址,假设您的 VM IP 是 192.168.1.103,并检查您的机器 IP(从您尝试连接的地方)是否具有不同的 IP 组,如(192.168.0.0 -- 或 10.0.0.0 -- )。因为有些时间窗口会创建它们的 NAT 和单独的 LAN 组。

如果是这样那么你就需要改变它。

相关内容