Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
User Accounts for SSH-tunneling only
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
maxx^hjb
n00b
n00b


Joined: 19 Oct 2002
Posts: 8

PostPosted: Fri Oct 25, 2002 11:40 am    Post subject: User Accounts for SSH-tunneling only Reply with quote

Hi!

I want to setup an Account that does not have a real shell but being able to connect via SSH. What I want is that the user is only able to open SSH-Tunnels on certain ports and cannot do anything else.

Any suggestions?

mAXx
Back to top
View user's profile Send private message
BackSeat
Apprentice
Apprentice


Joined: 12 Apr 2002
Posts: 242
Location: Reading, UK

PostPosted: Fri Oct 25, 2002 12:45 pm    Post subject: Reply with quote

Well, you could make the user's login shell a script file which only permits what you want the user to do, but you'd need to be careful that they can't break out of it.

BS
Back to top
View user's profile Send private message
maxx^hjb
n00b
n00b


Joined: 19 Oct 2002
Posts: 8

PostPosted: Fri Oct 25, 2002 2:10 pm    Post subject: Reply with quote

well... a script, that just does nothing would make me happy. But how do I setup such a script? I already tried writing a script that ends up in an endless loop, but then the user dont gets authenticated when trying to log in.
Back to top
View user's profile Send private message
securiteaze
Tux's lil' helper
Tux's lil' helper


Joined: 24 Oct 2002
Posts: 77
Location: Tulsa,Oklahoma

PostPosted: Mon Oct 28, 2002 3:01 am    Post subject: Reply with quote

I use /bin/true for similar operations. Verify it is in /etc/shells before assigning it to a user.
_________________
Blah..
Back to top
View user's profile Send private message
maxx^hjb
n00b
n00b


Joined: 19 Oct 2002
Posts: 8

PostPosted: Mon Oct 28, 2002 12:20 pm    Post subject: Reply with quote

Well... /bin/true didnt make it for me, because the user gets disconnected after a successful connect. But /etc/shells was the hint I was looking for... I added my script, which is just an endless loop, and voila... everything works fine now.

Thanks!

mAXx
Back to top
View user's profile Send private message
securiteaze
Tux's lil' helper
Tux's lil' helper


Joined: 24 Oct 2002
Posts: 77
Location: Tulsa,Oklahoma

PostPosted: Mon Oct 28, 2002 3:41 pm    Post subject: Reply with quote

Endless loop? Watch out for the endless loop using all your resources.
_________________
Blah..
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