1827892 Members
1882 Online
109969 Solutions
New Discussion

SFTP configuration

 
Jdamian
Respected Contributor

SFTP configuration

I need help to configure SFTP.

I looking for SFTP options in order to log user commands (in syslog file or any other) in the same style that -L option of FTPD.
6 REPLIES 6
U.SivaKumar_2
Honored Contributor

Re: SFTP configuration

Hi,

Put this line in sshd_config

SftpSysLogFacility

restart sshd

regards,
U.SivaKumar

Innovations are made when conventions are broken
Jdamian
Respected Contributor

Re: SFTP configuration

That doesn't work
Keith Buck
Respected Contributor

Re: SFTP configuration

Perhaps he meant something along the lines of

SftpSysLogFacility yes

(I'm not sure what the options are, but this matches the usual syntax of the sshd_config file)

You might also check the capitalization if you can find this option in the man page.
Jeff Schussele
Honored Contributor

Re: SFTP configuration

Well, I can't confirm it, but if it follows the same standard as the SyslogFacility value in sshd_config then the possible values should be:
DAEMON
USER
AUTH (default)
LOCAL0/1/2/3/4/5/6/7

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Jeff Schussele
Honored Contributor

Re: SFTP configuration

I forgot to mention that we set our sshd_config as follows:

SyslogFacility LOCAL5

I've searched for a server that might have had an sftp session, but I can't seem to find one. The above entry does give username & IP for every key accepted.

Try the above & test whether that's enough to log sftp activity - if not try
SftpSyslogFacility LOCAL5
& see if that does it.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Sridhar Bhaskarla
Honored Contributor

Re: SFTP configuration

Hi,

I am sorry that I may disappoint you that I there is nothing that would cause sftp subsystem to log exactly like ftp. You can set LogLevel to VERBOSE to get a verbose output but it does not seem to affect sftp much.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try