How to log ssh debug info?

前端 未结 3 652
你的背包
你的背包 2021-02-01 02:15

I need to write the output of ssh debug info into the file. This

ssh -v root@172.16.248.xx > result.txt
ssh -v root@172.16.248.xx 2>&1 > result.txt
         


        
3条回答
  •  故里飘歌
    2021-02-01 03:09

    You have to change the order of the redirections on the command line:

    ssh -v root@172.16.248.xx >result.txt 2>&1
    

    or just:

    ssh -v root@172.16.248.xx 2>result.txt
    

提交回复
热议问题