1752805 Members
5329 Online
108789 Solutions
New Discussion юеВ

sftp logging

 
Elena Leontieva
Esteemed Contributor

sftp logging

Hi,

How to configure sftp to log all files recieved/transmitted by sftp-server (similar to ftpd -o -i options)?

HP-UX 11.23, A.04.30.007 HP-UX Secure Shell

Thank you,
Elena.
7 REPLIES 7
Glenn S. Davidson
Trusted Contributor

Re: sftp logging

sftp gets it's configuration from ssh_config but you can specify the options on the sftp command line by using -o.

sftp -oLogLevel=VERBOSE

I didn't look up VERBOSE to see if that will provide what you are looking for but if you check the man pages on sftp and ssh_config you can probably find what you are looking for.
Conformity Destroys a mans initiative and independence. It supresses his powerful inner drive to do his own thing.
rariasn
Honored Contributor

Re: sftp logging

Hi elena:

#ssh -V
OpenSSH_4.4p1-hpn12v11, OpenSSL 0.9.7l 28 Sep 2006
HP-UX Secure Shell-A.04.40.006, HP-UX Secure Shell version

In "sshd_config" set this option:

Subsystem sftp /opt/ssh/libexec/sftp-server -f LOCAL1 -l INFO

Restart "sshd" daemon.

rgs.
Ivan Krastev
Honored Contributor

Re: sftp logging

Just use new sftp logging features, introduced in version 3.9 - http://docs.hp.com/en/T1471-90014/ch01s02.html#babhjeeh


regards,
ivan
Elena Leontieva
Esteemed Contributor

Re: sftp logging

Hello,

In ssshd_config I specified:

LogSftp yes
#SftpLogFacility AUTH
#SftpLogLevel INFO

But all I see in syslog.log is "Subsystem request for sftp".

Apparently the "-f" option does not work with the configuration file that I have.

Thanks,
Elena.
Ivan Krastev
Honored Contributor

Re: sftp logging

Use:

SftpLogLevel VERBOSE


regards,
ivan
Elena Leontieva
Esteemed Contributor

Re: sftp logging

Hi,

The same thing, no info about the file.

The bigger question is why I can not use the -f option.

I should use the -f option with my version of ssh:

coci160(root):/opt/ssh/etc > ssh -V
OpenSSH_4.5p1+sftpfilecontrol-v1.1-hpn12v14, OpenSSL 0.9.7l 28 Sep 2006
HP-UX Secure Shell-A.04.50.004, HP-UX Secure Shell version
coci160(root):/opt/ssh/etc >

But if I copy the default file /opt/ssh/newconfig/opt/ssh/etc/sshd_config and add "-f" the ssh would not start at all.

I upgraded to this version by installing it on top of the older version of ssh as recommended in the installation instructions.

Thanks,
Elena.


rariasn
Honored Contributor

Re: sftp logging

Hi Elena,

# man 8 sftp-server

and verify sftplogin options

http://sftplogging.sourceforge.net/docs/installation.html

rgs,