我正在尝试通过 ssh 连接到 Red Hat 7 Linux 服务器,但无法成功。我收到一条错误:
ssh [email protected]
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 62: Applying options for *
debug1: Executing proxy command: exec /usr/bin/sss_ssh_knownhostsproxy -p 22 10.48.216.147
debug1: permanently_drop_suid: 1990975652
debug1: identity file /home/tdunphy/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/tdunphy/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/tdunphy/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/tdunphy/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/tdunphy/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/tdunphy/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/tdunphy/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/tdunphy/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
ssh_exchange_identification: Connection closed by remote host
我已经在客户端检查了我的权限并且看起来不错:
[tdunphy@bastion-server01 ~]$ ls -ld .ssh
drwx------. 2 tdunphy tdunphy 58 Aug 12 17:34 .ssh
[tdunphy@bastion-server01 ~]$ ls -lh .ssh/*
-rw-------. 1 tdunphy tdunphy 408 Sep 11 2018 .ssh/authorized_keys
-rw-------. 1 tdunphy tdunphy 1.7K Aug 12 17:20 .ssh/id_rsa
-rw-------. 1 tdunphy tdunphy 408 Aug 12 17:34 .ssh/id_rsa.pub
这是我正在尝试 ssh 的服务器的 sshd_config:
Protocol 2
SyslogFacility AUTHPRIV
PasswordAuthentication yes
ChallengeResponseAuthentication no
GSSAPICleanupCredentials yes
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE
AcceptEnv XMODIFIERS
X11Forwarding yes
Subsystem sftp /usr/libexec/openssh/sftp-server
KerberosAuthentication no
PubkeyAuthentication yes
UsePAM yes
GSSAPIAuthentication yes
ClientAliveInterval 900
ClientAliveCountMax 0
IgnoreRhosts yes
HostbasedAuthentication no
PermitRootLogin no
PermitEmptyPasswords no
Banner /etc/issue
PermitUserEnvironment no
Ciphers aes128-ctr,aes192-ctr,aes256-ctr
/etc/hosts.allow
和中没有任何内容/etc/hosts.deny
。
我尝试做了restorecon -v /home/tdunphy/.ssh
但没有任何效果。
我该怎么做才能登录远程机器?