SSH to only 1 PC

I'm the only one handling linux system in office for our linode server. I want SSH/putty remote access to be allowed from my computer only. so that it'll reduce the chances of getting hacked from other locations.

How to make sure that nobody gets access when they attempt to log in via other location (other than office LAN)

3 Replies

#iptables -A INPUT -p tcp -s -m tcp –dport 1022 -j ACCEPT

*assuming you've already changed the default port that sshd listens to TCP1022

Alternatively add an IP address to the start of your public key line in ~/.ssh/authorized_keys

FROM="Source IP or hostname" ssh-rsa BLAHBLAHBLAH..

Or you could do both.

Setup SSH to only use public key authentication and set a really good password for your Linode account.

He could edit /etc/ssh/sshd_config and use AllowUsers user@ip syntax.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct