Page 1 of 1

Linux SSH server allow single IP connection

Posted: 2019 Apr 30, 13:39
by serveroffer
Open SSH server settings:

Code: Select all

nano /etc/ssh/sshd_config

add line to the end of file:

Code: Select all

AllowUsers *@REMOTE_IP

REMOTE_IP - is the IP address you want to allow connection from.

Allow range
To allow IP range instead of single IP, add line:

Code: Select all

AllowUsers *@10.10.10.*

It does allow any IP from range 10.10.10.1-255 to connect

CTRL+x - exit from nano and save settings to the file.
service ssh restart - restart SSHD server