- 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