当通过SFTP连接到服务器时,我可以使用-o指定LogLevel ,如下所示:
sftp -oLogLevel=DEBUG3 username@host
这吐出了大量关于login过程的debugging信息。 但是,它到了这一点,所有的debugging停止:
debug1: Sending subsystem: sftp debug2: channel 0: request subsystem confirm 1 debug2: callback done debug2: channel 0: open confirm rwindow 0 rmax 32768 debug2: channel 0: rcvd adjust 131072 debug2: channel_input_status_confirm: type 99 id 0 debug2: subsystem request accepted on channel 0 Connected to host. sftp> ls Some Directories sftp> cd Some sftp> ls sftp> quit debug2: channel 0: read<=0 rfd 4 len 0 debug2: channel 0: read failed debug2: channel 0: close_read debug2: channel 0: input open -> drain debug2: channel 0: ibuf empty debug2: channel 0: send eof debug2: channel 0: input drain -> closed debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 Received disconnect from <IP>: 11: User Disconnected
那个ls命令呢? 我在哪里可以得到debugging? cd ? quit ?
此外,我没有任何控制远程服务器,所以我不问通过sshd_config在服务器上configurationSFTP子系统。 我已经尝试过了,但不起作用。
sftp-client.c文件调用debug3,那么他们去哪里?
使用-vvv切换到sftp 。 选项-o直接传递给ssh进程,但对sftp本身无效。
这在sftp的手册页中有详细描述:
-v Raise logging level. This option is also passed to ssh.
另外-o解释说它被传递给ssh ,在sftp进程中不起作用:
-o ssh_option可以用来将选项传递给ssh_config(5)中使用的格式。 这对于指定没有单独的sftp命令行标志的选项很有用。 例如,要指定备用端口,请使用:sftp -oPort = 24。 有关下面列出的选项的完整详细信息及其可能的值,请参见ssh_config(5)。