Link to home
Start Free TrialLog in
Avatar of fosiul01
fosiul01Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Allow Ssh from SElected IP

Hi,
I want to allow Ssh from Selected Ip ( Suppose : 62.58.96.56 and 202.10.20.50 ip only) one is from home and another one is from office

how i will do that ??
so if any one from different IP trying to connect linux server by ssh it will deny,

Will i be able to do that and how ?
Avatar of http:// thevpn.guru
http:// thevpn.guru
Flag of Denmark image

iptables -A INPUT --source xx.xx.xx.xx -p tcp --dport 22 -j ACCEPT
iptables -A INPUT --source yy.yyy.yy.yy -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j DROP

1- Allow xx
2- Allow yy
3- Drop Rest
Avatar of fosiul01

ASKER

Hello Boss thanks

if i totaly stop Ssh , and if i use Shared key authentication

can i use Xp mechine to logon to linux server by using Shared key authentication ??

or do i need linux pc to perform shared key authentication ??

I just bought a VPs server.
 so want to secure that one.
ASKER CERTIFIED SOLUTION
Avatar of http:// thevpn.guru
http:// thevpn.guru
Flag of Denmark image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
if i stop ssh totaly what will happen ??

if i have to enable ssh ,  in that case, how i will disable password authentication ??

this is my last question for this post, i will close after this.


SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I agree with @maysara on the last comment. Sorry fosiul01 I lost view of the post yesterday :)