Re: Debugging SFTP for openSSH 4.4p1



Cam Macdonell wrote:
Hello,

I am trying to debug an SFTP server for openSSH v.4.4p1. I can get sshd
to debug with the -d and -e parameters. However, I cannot get SFTP to
output debugging info. Ideally I would like to it print out to stderr,
but to a log file is fine too. I've tried adding -l DEBUG3 to the
sshd_config with the sftp-server subsystem specification, but alas no
debugging is evident.

I've looked on-line but cannot find anything that is clear as what to do.

Any help or pointers to help are appreciated.

Thanks,
Cam


OpenSSH sftp doesn't log much (anything?) - Have a look at the sftp-logging
patches for openssh - they'll give you what you (we all!) want... I can
honestly say I've used it with success in a few locations.

http://sftplogging.sourceforge.net/

Sample debug output (from the link):
Apr 27 17:00:35 host sftp-server[2888]: client is not permitted to chown.
Apr 27 17:00:35 host sftp-server[2888]: realpath .
Apr 27 17:00:39 host sftp-server[2888]: opendir /u/mikem/
Apr 27 17:00:45 host sftp-server[2888]: realpath /u/mikem/temp
Apr 27 17:00:53 host sftp-server[2888]: setting file creation mode to 0666 and
umask to 22
Apr 27 17:00:53 host sftp-server[2888]: open /u/mikem/temp/somefile.file
Apr 27 17:00:53 host sftp-server[2888]: writing 32768 bytes to file
Apr 27 17:01:00 host last message repeated 873 times
Apr 27 17:01:00 host sftp-server[2888]: writing 9882 bytes to file
Apr 27 17:01:07 host sftp-server[2888]: sftp-server finished.

--
cheers
brian



Relevant Pages

  • Re: Does OpenSSH use RCP?
    ... > with someone about the difference between OpenSSH and SFTP. ... > SFTP) than SCP will fail. ... OpenSSH uses an implementation that is compatible to the original SSH ...
    (comp.security.unix)
  • OpenSSH: sftp & bypassing keypair auth restrictions
    ... Subject: OpenSSH: sftp & bypassing keypair auth restrictions ... *not* possible to prevent the client from using the sftp subsystem. ...
    (Bugtraq)
  • Re: Putty psftp connection problem...
    ... here is the original message I sent to the openssh and putty ... A customer of mine reported that sftp didn't work for them. ... On the unix system the sshd reports the ...
    (comp.security.ssh)
  • Re: sftp with expect
    ... set target INBOX ... spawn sftp $user@$host ... exp4) match glob pattern "sftp>"? ... DEBUG ls ...
    (comp.lang.tcl)
  • sftp server
    ... I am trying to build an sftp server and chroot the users to ... their home directories. ... openssh, openssh-server, and openssh-client. ... Once I try to sftp into the server I receive the following error message: ...
    (RedHat)