美文网首页
ssh连接不了问题

ssh连接不了问题

作者: 黑客不黑_ | 来源:发表于2019-04-03 17:06 被阅读0次
  • ssh连接不了问题

1、查看是否正常是否报错,文件相关权限是否正常,不提示就是正常。

[root@izysl2jv0d6fukz ssh]# sshd -t

2、更改相关文件权限,不要都设置为755或者777权限。

[root@izysl2jv0d6fukz ssh]# cd /etc/ssh
[root@izysl2jv0d6fukz ssh]# ll
[root@izysl2jv0d6fukz ssh]# chmod 644 moduli ssh_config ssh_host_dsa_key.pub ssh_host_ecdsa.pub ssh_host_ed25519_key.pub ssh_host_rsa_key.pub
[root@izysl2jv0d6fukz ssh]# chmod 600 ssh_host_dsa_key ssh_host_ed25519_key ssh_host_ecdsa_key ssh_host_rsa_key
[root@izysl2jv0d6fukz ssh]# sshd -t
[root@izysl2jv0d6fukz ssh]# systemctl restart sshd

3、查看端口

[root@izysl2jv0d6fukz ssh]# netstat -ntalp | grep ssh
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      6567/sshd
tcp        0     52 172.18.28.30:22         61.242.42.242:42877     ESTABLISHED 9400/sshd: root@pts

4、查看权限

[root@izysl2jv0d6fukz ssh]# cd /etc/ssh
[root@izysl2jv0d6fukz ssh]# ll
total 604
total 612
-rw-r--r-- 1 root root     581843 Apr 11  2018 moduli
-rw-r--r-- 1 root root       2276 Apr 11  2018 ssh_config
-rw------- 1 root root       3668 Dec  3 20:08 sshd_config
-rw------- 1 root root        668 Dec  3 20:09 ssh_host_dsa_key
-rw-r--r-- 1 root root        610 Dec  3 20:09 ssh_host_dsa_key.pub
-rw------- 1 root root        227 Dec  3 20:09 ssh_host_ecdsa_key
-rw-r--r-- 1 root root        182 Dec  3 20:09 ssh_host_ecdsa_key.pub
-rw-r----- 1 root ssh_keys    387 Dec  3 20:09 ssh_host_ed25519_key
-rw-r--r-- 1 root root         82 Dec  3 20:09 ssh_host_ed25519_key.pub
-rw------- 1 root root       1675 Dec  3 20:09 ssh_host_rsa_key
-rw-r--r-- 1 root root        402 Dec  3 20:09 ssh_host_rsa_key.pub

相关文章

  • ssh连接不了问题

    ssh连接不了问题 1、查看是否正常是否报错,文件相关权限是否正常,不提示就是正常。 2、更改相关文件权限,不要都...

  • iOS 10之后SSH连接不上的问题解决

    连接SSH的时候出现了无论我是ssh root@ip 还是通过USB去连接都连接不上的问题。 连接SSH的几种方式...

  • scp或ssh时提示“Host key verification

    问题原因:ssh连接连接时发现ask不匹配,拒绝连接。 解决办法:将/etc/ssh/ssh_config内的 S...

  • 远程连接服务器超时问题

    SSH连接超时问题 - 解决

  • Mac 上启动开启 sshd 服务

    问题: 用 ssh 远程连接 Mac 电脑时候出现 ssh: connect to host localhost ...

  • mac连接不上ssh

    问题 连接某个ssh的时候,卡半天,结果还是连不上 解决 删除缓存重新连接$ vi ~/.ssh/known_ho...

  • 九、mac连接 远程linux

    一、ssh连接 root:用户名 二、连接时长问题 参照这个解决连接长问题https://blog.csdn.ne...

  • 如何调试SSH连接

    本文将介绍一些可用于诊断SSH连接的快速方法和技术,包括何时无法连接SSH,身份验证错误等。 问题一:SSH服务没...

  • Xshell 连接不上 CentOS7 服务器

    1、问题描述 第一次遇到ssh连接不上,但是又ping的通,网络也没问题。经过网上搜索ssh 连接不上,提示Soc...

  • ssh端口映射

    考虑到在程序中使用ssh认证连接MongoDB数据库的问题,还折腾了《Java使用SSH连接MongoDB》[ht...

网友评论

      本文标题:ssh连接不了问题

      本文链接:https://www.haomeiwen.com/subject/vhwzbqtx.html