在两台机器(Windows 和 Linux)之间建立公钥认证
当我尝试从第一台机器(操作系统:Centos 7)连接到第二台机器(Windows 服务器)时,显示一条错误消息:
shell request failed on channel 0
我使用调试连接执行,这是输出:ssh [email protected]
-v
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 *
debug1: Connecting to 192.168.1.146 [192.168.1.146] port 22.
debug1: Connection established.
debug1: identity file /home/docker/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.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 SSHBlackbox.10
debug1: no match: SSHBlackbox.10
debug1: Authenticating to 192.168.1.146:22 as 'administrator'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group14-sha1
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: diffie-hellman-group14-sha1 need=32 dh_need=32
debug1: kex: diffie-hellman-group14-sha1 need=32 dh_need=32
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Server host key: ssh-rsa SHA256:yUlYQrtRhzqQ+5rGH01E1R4VO1uxEp6POxCIOSHwWOk
debug1: Host '192.168.1.146' is known and matches the RSA host key.
debug1: Found key in /home/docker/.ssh/known_hosts:4
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 4294967296 blocks
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: password,publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/docker/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Authentication succeeded (publickey).
Authenticated to 192.168.1.146 ([192.168.1.146]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LANG = en_GB.UTF-8
shell request failed on channel 0
当我尝试从作者终端连接到 Windows 机器时,他要求我提供administrator
用户密码
请帮帮我,我被困住了
答案1
尝试卸载 /dev/pts 然后挂载 /dev/pts 就可以了