Linux SSH server allow single IP connection

Tutorials thread
User avatar
serveroffer
Site Admin
Posts: 50
Joined: 2012 Jun 16, 18:31

Linux SSH server allow single IP connection

Postby serveroffer » 2019 Apr 30, 13:39

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

Return to “Tutorials”

Who is online

Users browsing this forum: No registered users and 62 guests