I need to write the output of ssh debug info into the file. This
ssh -v [email protected] > result.txt
ssh -v [email protected] 2>&1 > result.txt
doesn't work, the file result.txt is empty, but on the screen i see bunch of debug lines, like:
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
Is there a way to redirect these lines to the file?
question from:
https://stackoverflow.com/questions/7533661/how-to-log-ssh-debug-info 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…