Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SSH restriction and public keys.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Nondegenerate
n00b
n00b


Joined: 19 Jan 2004
Posts: 7

PostPosted: Tue May 03, 2005 6:52 pm    Post subject: SSH restriction and public keys. Reply with quote

I'd like to configure SSH on my gateway box such that if an incoming SSH connection originates from a specific "blessed" IP address or range of IP addresses that authentication may take place with a user/pass and for all other incoming connections they must use key authentication. Is this possible and how can I set this up?
Back to top
View user's profile Send private message
humbletech99
Veteran
Veteran


Joined: 26 May 2005
Posts: 1229
Location: London

PostPosted: Mon Dec 19, 2005 10:44 pm    Post subject: Reply with quote

setup two ssh daemons with different configs listening to different ports and then use iptables to grant the desired ip/range access to the port with user/pass and the other only allowed to the port only allowing key auth.
Back to top
View user's profile Send private message
tuxmin
l33t
l33t


Joined: 24 Apr 2004
Posts: 838
Location: Heidelberg

PostPosted: Tue Dec 20, 2005 10:40 am    Post subject: Reply with quote

Read the section AUTHORIZED_KEYS FILE FORMAT in "man sshd". Maybe you can use the from="pattern-list" to achieve your goal.


Alex!!!
_________________
ALT-F4
Back to top
View user's profile Send private message
Jrauch
n00b
n00b


Joined: 19 Dec 2005
Posts: 20

PostPosted: Tue Dec 20, 2005 4:05 pm    Post subject: Reply with quote

Also, the allowusers and DenyUsers directives may be useful.
I think you are going to need a seperate instance of the server though.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum