主机论坛_虚拟主机_美国主机_美国虚拟主机_云主机技术_全球主机交流聚集地—Web Hosting Talk 中文站

找回密码
立即注册
发新帖

0

收听

1

听众

651

主题
发表于 2021-3-17 12:03:12 | 查看: 527| 回复: 0
  在我们平常租用RAKsmart美国服务器时,大家可能都会SSH来连接Linux服务器,一般对文件进行传输和下载。不过,在我们连接SSH时,可能经常会出现错误。SSH为Secure Shell的缩写,专为远程登录会话和其他网络服务提供安全性的协议。通过使用SSH,用户可以把所有传输的数据进行加密,从而保证了数据的安全性。为此,这里总结下RAKsmart美国服务器连接SSH出现的常见错误及解决方法:
  1、错误提示:
  # ssh root @192.168.***.**
  ssh: connect to host192.168.***.** port 22: No route to host
  错误原因:服务器端没有开机或是网络出现问题,亦或是IP输入错误。
  2、错误提示:
  # ssh root @192.168.***.**
  ssh: connect to host 192.168.***.** port 22: Connection refuse
  原因:对方服务器端SSH服务器暂未启动。
  解决方法如下:
  ①、确认登录的主机是否已经安装了openssh-client ;
  ②、键入ps -e | grep ssh确认sshserver是否启动了。如果看到SSH说明已启动,没有的话,需要输入/etc/init.d/sshd start来启动。
  ③、配置文件的路径是/etc/ssh/sshd_config,一般能设置SSH的服务端口(默认是22端口,也可以设置成其他的)。
  ④、设置完成后,重启SSH服务,输入命令:
  /etc/init.d/ssh stop
  /etc/init.d/ssh start
  ⑤、最后我们可以登陆SSH,方法如下:
  输入:ssh root @192.168.***.**(root为192.168.***.**主机的管理员账号),然后输入密码就可以了。
  3、错误提示:
  # ssh 192.168.***.**
  root @192.168.***.** password:
  Permission denied, please try again
  错误原因:由于登录权限,修改访问权限即可。
  解决方法:打开/etc/ssh/sshd_config文件,找到“PermitRootLogin no”语句,将其改为“PermitRootLogin yes”就可以了,同时,将前面的注释#去掉。
  4、错误提示
  ssh root @192.168.***.**
  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
  Someone could be eavesdropping on you right now (man-in-the-middle attack)!
  It is also possible that the RSA host key has just been changed.
  The fingerprint for the RSA key sent by the remote host is
  6b:3b:66:94:cb:a6:59:91:b2:20:ff:b6:52:4d:7b:6a
  Please contact your system administrator.
  Add correct host key in /home/fante/.ssh/known_hosts to get rid of thismessage.
  ………………
  错误原因:服务器端密码或是其它发生变化的时候。
  解决方法:删除~/.ssh/known_hosts的信息,然后再登录即可。

  以上就是咱们在使用SSH登录raksmart美国服务器时,可能会出现的几种常见问题。如果在登录时遇到了,可以按照上述方法加以解决,以上方法仅供参考。

<a href="https://cn.bluehost.com" target="_blank">

收藏回复 显示全部楼层 道具 举报

您需要登录后才可以回帖 登录 | 立即注册

Archiver|手机版|小黑屋|WebHostingTalk中文站

GMT+8, 2024-4-29 12:33 , Processed in 0.077653 second(s), 27 queries .

Powered by Discuz! X3.4

Copyright © 2001-2024, Tencent Cloud.

快速回复 返回顶部 返回列表