Logging IP's of successful SSH logins? Is it possible?

Currently reading
Logging IP's of successful SSH logins? Is it possible?

2
0
Operating system
  1. Linux
  2. macOS
Mobile operating system
  1. iOS
Hello, I see I can find the IP addresses of UNsuccessful logins at. /var/log/auth.log but when a successful login happens it does not record the IP address.



Is there another way I can find the IP address of SUCCESSUFL SSH logins?



Thanks!!!
 

fredbert

Moderator
NAS Support
Subscriber
1,700
692
NAS
DS1520+, DS218+, DS215j
Router
  1. RT2600ac
  2. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
Have you looked in Log Center and filtered on Connection type? I see entries like this:

User [DSM_ADMIN_USER] from [IP_ADDRESS] logged in successfully via [SSH].
 
2
0
Operating system
  1. Linux
  2. macOS
Mobile operating system
  1. iOS
Ah yes... this looks good! I did not know about log center! THANK YOU!

One unrelated question maybe you know about... I want to have different white-list or black list for SSH traffic than for SFTP traffic with the firewall... do you know if this is possible?

Since I am off topic now... I can post another question on this :)
 

fredbert

Moderator
NAS Support
Subscriber
1,700
692
NAS
DS1520+, DS218+, DS215j
Router
  1. RT2600ac
  2. MR2200ac
Operating system
  1. macOS
Mobile operating system
  1. iOS
You can use different TCP ports for SSH and SFTP .... I do this so that SSH is not exposed the the Internet. Set them here:

SFTP ... Control Panel -> File Services -> FTP
SSH ... Control Panel -> Terminal & SNMP -> Terminal

Apply firewall rule per TCP port/service. Also port forwarding can be to whichever service you want.
 
1,106
362
NAS
DS418play, DS213j, DS3621+, DSM 7.0.4-11091
SFTP ... Control Panel -> File Services -> FTP
SSH ... Control Panel -> Terminal & SNMP -> Terminal
Can't overstate this. If you haven't run Security Advisor, so periodically with all features selected:

 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Top