Monday, February 23, 2009

014 调试SSH客户端会话

有时候我们需要打印调试信息来查找SSH客户端出现的问题。将参数-v(小写的v)传给ssh命令就可以显示调试信息。
以下是不包含调试信息的例子:
localhost$ ssh -l jsmith remotehost.example.com 

warning: Connecting to remotehost.example.com failed:
No address associated to the name

以下是包含调试信息的例子:


locaclhost$ ssh -v -l jsmith remotehost.example.com

debug:
SshConfig/sshconfig.c:2838/ssh2_parse_config_ext:
Metaconfig parsing stopped at line 3.

debug:
SshConfig/sshconfig.c:637/ssh_config_set_param_verbose:
Setting variable 'VerboseMode’ to 'FALSE’.

debug:
SshConfig/sshconfig.c:3130/ssh_config_read_file_ext:
Read 17 params from config file.

debug: Ssh2/ssh2.c:1707/main: User config file not
found, using defaults. (Looked for
'/home/jsmith/.ssh2/ssh2_config’)

debug: Connecting to remotehost.example.com, port 22…
(SOCKS not used)
warning: Connecting to remotehost.example.com failed:
No address associated to the name

No comments:

Post a Comment