sshd Log file

Marvell Kirkwood based
Post Reply
catalin
Posts: 1
Joined: Sat Jan 07, 2017 8:11 pm

sshd Log file

Post by catalin » Sat Jan 07, 2017 8:23 pm

Hello,

I've installed ffp on my Zyxel NS320 and I try to configure the chrooted sftp account.
I've modified the /usr/local/zy-pkgs/ffproot/ffp/etc/ssh/sshd_config and restarted sshd. However the sftp connexion the chrooted user not work, and I search to see the error message.

I found no log file in /var/log.

Where are the log of sshd on the NS 320. More generally where are the system log ?

Thanks !
Catalin...

barmalej2
Posts: 2387
Joined: Sun Apr 29, 2012 5:24 pm

Re: sshd Log file

Post by barmalej2 » Mon Jan 09, 2017 6:51 am

If you want to enable logging for sshd you need to update it. All steps below is supposed to be done via ssh.
Enable telnet first as fallback option to login .

Code: Select all

chmod a+x /ffp/start/telnetd.sh
sh /ffp/start/telnetd.sh start
Update openssh with openssl together:

Code: Select all

slacker -UaA br2:{openssh,openssl}
Restart sshd service:

Code: Select all

sh /ffp/start/sshd.sh restart
Stop it:

Code: Select all

sh /ffp/start/sshd.sh stop
Edit sshd startup file - /ffp/start/sshd.sh and change row sshd_flags="" to
sshd_flags="-E /ffp/var/log/sshd.log"
Start sshd service again:

Code: Select all

sh /ffp/start/sshd.sh start
Do your tests and check log file.
Logs verbosity is controlled in /ffp/etc/ssh/sshd_config file by parameter-LogLevel. INFO by default. If INFO is not enough verbose then uncomment row #LogLevel INFO and change INFO to any desirable value:
QUIET, FATAL, ERROR,VERBOSE, DEBUG, DEBUG1, DEBUG2, or DEBUG3.
After making changes in sshd_config file you need to reload it for running sshd service:

Code: Select all

sh /ffp/start/sshd.sh reload
After all testing revert changes back. Keep in mind that startup file /ffp/start/sshd.sh should be edited only if sshd service is stopped.
Start it after editing and check if you can login as root directly via ssh. Then disable telnet service:

Code: Select all

chmod a-x /ffp/start/telnetd.sh
sh /ffp/start/telnetd.sh stop

Post Reply