|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
||||
I can't do any testing right now; but I think that sftp can be logged if you set up the appropriate subsystem. See the sftp-server(8) man page, and the Subsystem discussion in sshd_config(5).
|
|
||||
Thanks for the reply jggimi,
I'm using the "internal-sftp" subsystem in my sshd_config file. So, from the sftp-server(8) man page I would want to add a -f AUTH -l ERROR to start logging, Right? Full line would read, Code:
Subsystem sftp internal-sftp -f AUTH -l ERROR |
|
||||
I changed the line in my sshd_config file and added -f AUTH -l ERROR. Restarted the sshd and now it seem to be logging to my /var/log/authlog file which is very great!
Thanks jggimi! Also, Is there be a way to run a command to show the uses log on? like something I could run before shutting down or restarting the computer? Thanks for the help! |
|
||||
I think you asked the same question in your first post.
I'm not aware of any such command in the OS, nor, am I aware of one in the ports/package system. I would think that if sftp-server or internal-sftp used utmp/wtmp, the standard user tools like w(1) could be used. |
|
||||
Yup, you are right. Logging was going to be the next thing I asked tho.
Quote:
Thanks for all the help jggimi! |
|
|||
Connections via sftp aren't considered interactive logins, thus.. are not registered via utmp(5)/wmtp.
While you're free to look at the relevant man pages amscotti, they are a programming API.. not programs. Sorry, but it's still easy to determine active connections with a little more.. work. $ fstat | grep internet | grep "<--" | grep "sshd" | grep -v "root" | cut -d ' ' -f 1 It's a little primitive, but.. it'll get the job done. |
Tags |
sftp |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Buy/Sell/Free Hardware List | DrJ | Off-Topic | 30 | 21st October 2023 12:59 PM |
PHP~MYSQL - Get list of all the fields within a table | cksraj | Programming | 2 | 22nd April 2009 05:57 AM |
SATA connected CD/DVD drives, any experience? | teig | FreeBSD General | 13 | 6th December 2008 01:35 AM |
How to get a list of volumes? | PeterSteele | Programming | 12 | 17th July 2008 09:32 AM |
Command to list all installed ports? | windependence | FreeBSD Ports and Packages | 2 | 13th May 2008 11:10 AM |