ssh -vv ip
时间: 2024-09-29 09:10:42 浏览: 45
当你在终端中使用命令 `ssh -vv ip` 这个时候,你正在运行的是 Secure Shell (SSH) 的详细调试模式。其中 `-v` 参数表示增加一级日志详细程度,`-vv` 表示增加两级,总共两层的详细输出。这种模式下,SSH 客户端会显示更多的通信细节,包括加密算法的选择、认证过程以及网络连接的各个阶段,这对于排查连接问题或是理解SSH工作的底层原理非常有用。
例如,输出可能会包含:
```
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to ip [192.0.2.1] port 22.
debug1: Connection established.
debug1: identity file /home/user/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/user/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_8.4
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.9p1 Debian-10+deb10u1
debug1: match: OpenSSH_7.9p1 Debian-10+deb10u1 pat OpenSSH* compat 0x0c000000
debug1: Authenticating to ip:22 as 'user'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh2
...
```
阅读全文