初接触 Linux,172.16.1.146 是被连接的主机,系统是 BT5,下面是另一台主机连接失败输出的内容,在 Windows 下用 putty 也连接不上,希望大家帮忙分析一下原因。
[root@centos7 ~]# ssh -vvv 172.16.1.146
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug2: resolving "172.16.1.146" port 22
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to 172.16.1.146 [172.16.1.146] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3p1 Debian-3ubuntu7
debug1: match: OpenSSH_5.3p1 Debian-3ubuntu7 pat OpenSSH_5* compat 0x0c000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 172.16.1.146:22 as 'root'
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
Connection closed by 172.16.1.146 port 22
下面两张图是 BT5 sshd_config 的截图
1
imdong 2019-04-28 18:15:34 +08:00
debug1: key_load_public: No such file or directory
|
2
PbCopy111 2019-04-29 09:17:50 +08:00
你是怎么验证登陆 ssh 的?
|
4
51Tao 2019-04-29 12:14:43 +08:00
没有运行 root 的密码登录吧?
|
6
kim959501 2019-04-30 10:22:22 +08:00
1. ssh-key 生成了吗?文件权限配置正确?
2. ssh 验证方式是什么?密码 or key 3. 是否禁用了 root 登录 |