我正在尝试 ssh 进入如下设备:
ssh [email protected]
然后它要求输入密码,一旦我输入密码,它就会显示上次登录,然后光标开始在下一行中闪烁,而不会打开提示:
C:\Windows\system32>ssh [email protected]
[email protected]'s password:
Last login: Tue Sep 5 09:42:25 2023 from 169.254.52.134
我如何进一步了解该设备?我尝试使用 -vvv 然后它显示以下内容:
rahulsharma@Rahuls-MacBook-Air ~ % ssh [email protected] -vvv
OpenSSH_9.0p1, LibreSSL 3.3.6
debug1: Reading configuration data /Users/rahulsharma/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files
debug1: /etc/ssh/ssh_config line 54: Applying options for *
\debug2: resolve_canonicalize: hostname 192.168.1.16 is address
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/Users/rahulsharma/.ssh/known_hosts'
debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/Users/rahulsharma/.ssh/known_hosts2'
debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling
debug3: ssh_connect_direct: entering
debug1: Connecting to 192.168.1.16 [192.168.1.16] port 22.
debug3: set_sock_tos: set socket 3 IP_TOS 0x48
debug1: Connection established.
debug1: identity file /Users/rahulsharma/.ssh/id_rsa type -1
debug1: identity file /Users/rahulsharma/.ssh/id_rsa-cert type -1
debug1: identity file /Users/rahulsharma/.ssh/id_ecdsa type -1
debug1: identity file /Users/rahulsharma/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/rahulsharma/.ssh/id_ecdsa_sk type -1
debug1: identity file /Users/rahulsharma/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /Users/rahulsharma/.ssh/id_ed25519 type 3
debug1: identity file /Users/rahulsharma/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/rahulsharma/.ssh/id_ed25519_sk type -1
debug1: identity file /Users/rahulsharma/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /Users/rahulsharma/.ssh/id_xmss type -1
debug1: identity file /Users/rahulsharma/.ssh/id_xmss-cert type -1
debug1: identity file /Users/rahulsharma/.ssh/id_dsa type -1
debug1: identity file /Users/rahulsharma/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_9.0
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.2
debug1: compat_banner: match: OpenSSH_8.2 pat OpenSSH* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 192.168.1.16:22 as 'admin'
debug1: load_hostkeys: fopen /Users/rahulsharma/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug3: order_hostkeyalgs: no algorithms matched; accept original
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: [email protected],curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,ext-info-c
debug2: host key algorithms: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,rsa-sha2-512,rsa-sha2-256
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected],zlib
debug2: compression stoc: none,[email protected],zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected]
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: rsa-sha2-512
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-rsa SHA256:lo8VeFhLKWf4YLYyYOWlgYcqQo6JGeIp2O6JZbJV/oY
debug1: load_hostkeys: fopen /Users/rahulsharma/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug3: hostkeys_find_by_key_hostfile: trying user hostfile "/Users/rahulsharma/.ssh/known_hosts"
debug3: hostkeys_foreach: reading file "/Users/rahulsharma/.ssh/known_hosts"
debug1: hostkeys_find_by_key_cb: found matching key in ~/.ssh/known_hosts:4
debug1: hostkeys_find_by_key_cb: found matching key in ~/.ssh/known_hosts:5
debug3: hostkeys_find_by_key_hostfile: trying user hostfile "/Users/rahulsharma/.ssh/known_hosts2"
debug1: hostkeys_find_by_key_hostfile: hostkeys file /Users/rahulsharma/.ssh/known_hosts2 does not exist
debug3: hostkeys_find_by_key_hostfile: trying system hostfile "/etc/ssh/ssh_known_hosts"
debug1: hostkeys_find_by_key_hostfile: hostkeys file /etc/ssh/ssh_known_hosts does not exist
debug3: hostkeys_find_by_key_hostfile: trying system hostfile "/etc/ssh/ssh_known_hosts2"
debug1: hostkeys_find_by_key_hostfile: hostkeys file /etc/ssh/ssh_known_hosts2 does not exist
The authenticity of host '192.168.1.16 (192.168.1.16)' can't be established.
RSA key fingerprint is SHA256:lo8VeFhLKWf4YLYyYOWlgYcqQo6JGeIp2O6JZbJV/oY.
This host key is known by the following other names/addresses:
~/.ssh/known_hosts:4: 192.168.1.24
~/.ssh/known_hosts:5: 169.254.10.1
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.1.16' (RSA) to the list of known hosts.
debug3: send packet: type 21
debug2: ssh_set_newkeys: mode 1
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: ssh_set_newkeys: mode 0
debug1: rekey in after 134217728 blocks
debug1: get_agent_identities: bound agent to hostkey
debug1: get_agent_identities: ssh_fetch_identitylist: agent contains no identities
debug1: Will attempt key: /Users/rahulsharma/.ssh/id_rsa
debug1: Will attempt key: /Users/rahulsharma/.ssh/id_ecdsa
debug1: Will attempt key: /Users/rahulsharma/.ssh/id_ecdsa_sk
debug1: Will attempt key: /Users/rahulsharma/.ssh/id_ed25519 ED25519 SHA256:WPKAU4zppdVLB60mOTZbjK+xEpjsQQ5skQ0HcB/jpeA
debug1: Will attempt key: /Users/rahulsharma/.ssh/id_ed25519_sk
debug1: Will attempt key: /Users/rahulsharma/.ssh/id_xmss
debug1: Will attempt key: /Users/rahulsharma/.ssh/id_dsa
debug2: pubkey_prepare: done
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,[email protected],ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected]>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/rahulsharma/.ssh/id_rsa
debug3: no such identity: /Users/rahulsharma/.ssh/id_rsa: No such file or directory
debug1: Trying private key: /Users/rahulsharma/.ssh/id_ecdsa
debug3: no such identity: /Users/rahulsharma/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /Users/rahulsharma/.ssh/id_ecdsa_sk
debug3: no such identity: /Users/rahulsharma/.ssh/id_ecdsa_sk: No such file or directory
debug1: Offering public key: /Users/rahulsharma/.ssh/id_ed25519 ED25519 SHA256:WPKAU4zppdVLB60mOTZbjK+xEpjsQQ5skQ0HcB/jpeA
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /Users/rahulsharma/.ssh/id_ed25519_sk
debug3: no such identity: /Users/rahulsharma/.ssh/id_ed25519_sk: No such file or directory
debug1: Trying private key: /Users/rahulsharma/.ssh/id_xmss
debug3: no such identity: /Users/rahulsharma/.ssh/id_xmss: No such file or directory
debug1: Trying private key: /Users/rahulsharma/.ssh/id_dsa
debug3: no such identity: /Users/rahulsharma/.ssh/id_dsa: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
[email protected]'s password:
debug3: send packet: type 50
debug2: we sent a password packet, wait for reply
debug3: receive packet: type 52
Authenticated to 192.168.1.16 ([192.168.1.16]:22) using "password".
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting [email protected]
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: filesystem
debug3: receive packet: type 80
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug3: client_input_hostkeys: received RSA key SHA256:lo8VeFhLKWf4YLYyYOWlgYcqQo6JGeIp2O6JZbJV/oY
debug1: client_input_hostkeys: searching /Users/rahulsharma/.ssh/known_hosts for 192.168.1.16 / (none)
debug3: hostkeys_foreach: reading file "/Users/rahulsharma/.ssh/known_hosts"
debug3: hostkeys_find: found ssh-rsa key under different name/addr at /Users/rahulsharma/.ssh/known_hosts:4
debug3: hostkeys_find: found ssh-rsa key under different name/addr at /Users/rahulsharma/.ssh/known_hosts:5
debug3: hostkeys_find: found ssh-rsa key at /Users/rahulsharma/.ssh/known_hosts:6
debug1: client_input_hostkeys: searching /Users/rahulsharma/.ssh/known_hosts2 for 192.168.1.16 / (none)
debug1: client_input_hostkeys: hostkeys file /Users/rahulsharma/.ssh/known_hosts2 does not exist
debug3: client_input_hostkeys: 1 server keys: 0 new, 1 retained, 0 incomplete match. 0 to remove
debug1: client_input_hostkeys: no new or deprecated keys from server
debug3: receive packet: type 91
debug2: channel_input_open_confirmation: channel 0: callback start
debug2: fd 3 setting TCP_NODELAY
debug3: set_sock_tos: set socket 3 IP_TOS 0x48
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug3: send packet: type 98
debug1: Sending environment.
debug3: Ignored env __CFBundleIdentifier
debug3: Ignored env TMPDIR
debug3: Ignored env XPC_FLAGS
debug3: Ignored env TERM
debug3: Ignored env SSH_AUTH_SOCK
debug3: Ignored env XPC_SERVICE_NAME
debug3: Ignored env TERM_PROGRAM
debug3: Ignored env TERM_PROGRAM_VERSION
debug3: Ignored env TERM_SESSION_ID
debug3: Ignored env SHELL
debug3: Ignored env HOME
debug3: Ignored env LOGNAME
debug3: Ignored env USER
debug3: Ignored env PATH
debug3: Ignored env SHLVL
debug3: Ignored env PWD
debug3: Ignored env OLDPWD
debug1: channel 0: setting env LC_CTYPE = "UTF-8"
debug2: channel 0: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env _
debug3: Ignored env __CF_USER_TEXT_ENCODING
debug2: channel 0: request shell confirm 1
debug3: send packet: type 98
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug2: channel 0: rcvd adjust 2097152
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0
Last login: Fri Sep 8 05:43:22 2023 from 169.254.99.139
这是我的 ssh_config 文件:
# $OpenBSD: ssh_config,v 1.35 2020/07/17 03:43:42 dtucker Exp $
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.
# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.
# This Include directive is not part of the default ssh_config shipped with
# OpenSSH. Options set in the included configuration files generally override
# those that follow. The defaults only apply to options that have not been
# explicitly set. Options that appear multiple times keep the first value set,
# unless they are a multivalue option such as IdentityFile.
Include /etc/ssh/ssh_config.d/*
# Site-wide defaults for some commonly used options. For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.
# Host *
# ForwardAgent no
# ForwardX11 no
# PasswordAuthentication yes
# HostbasedAuthentication no
# GSSAPIAuthentication no
# GSSAPIDelegateCredentials no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# IdentityFile ~/.ssh/id_ecdsa
# IdentityFile ~/.ssh/id_ed25519
# Port 22
# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
# MACs hmac-md5,hmac-sha1,[email protected]
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
# VisualHostKey no
# ProxyCommand ssh -q -W %h:%p gateway.example.com
# RekeyLimit 1G 1h
# UserKnownHostsFile ~/.ssh/known_hosts.d/%k
Host *
SendEnv LANG LC_*