【发布时间】:2011-11-23 22:07:59
【问题描述】:
我需要将 ssh 调试信息的输出写入文件。这个
ssh -v root@172.16.248.xx > result.txt
ssh -v root@172.16.248.xx 2>&1 > result.txt
不起作用,文件 result.txt 是空的,但在屏幕上我看到一堆调试行,例如:
OpenSSH_5.3p1 Debian-3ubuntu7, OpenSSL 0.9.8k 25 Mar 2009
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 172.16.248.xx [172.16.248.xx] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
etc
有没有办法将这些行重定向到文件?
【问题讨论】: