在使用SSH连接到远程服务器时,我遇到了问题,并且在运行启用-vvv交换机的连接时,我试图了解从SSH中看到的一些输出。
我正在从我的项目文件夹运行下面的命令..。
ssh -i keyfile.pem root@$REMOTE_HOST -vvv
在输出中,我看到SSH是从“/root/.SSH/已知的主机”读取的。这可能是一个愚蠢的问题,但这是从远程主机还是从我的盒子上的同一个文件夹中读取的?
我在Kali上作为root运行(是的,我知道,不要以root的身份运行)。
OpenSSH_8.0p1 Debian-6, OpenSSL 1.1.1d 10 Sep 2019
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolve_canonicalize: hostname $REMOTE_HOST is address
debug2: ssh_connect_direct
debug1: Connecting to $REMOTE_HOST [$REMOTE_HOST] port 22.
debug1: Connection established.
debug1: identity file key2.pem type -1
debug1: identity file key2.pem-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.0p1 Debian-6
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3p2 Debian-9
debug1: match: OpenSSH_4.3p2 Debian-9 pat OpenSSH_2*,OpenSSH_3*,OpenSSH_4* compat 0x00000002
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to $REMOTE_HOST:22 as 'root'
debug3: hostkeys_foreach: reading file "/root/.ssh/known_hosts" # HERE
debug3: record_hostkey: found key type RSA in file /root/.ssh/known_hosts:7
debug3: load_hostkeys: loaded 1 keys from $REMOTE_HOST发布于 2019-10-23 14:13:11
这是一本本地读物。Ssh需要检查服务器的标识。每个用户都有自己的服务器列表。
https://serverfault.com/questions/989121
复制相似问题