LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-09-2015, 08:55 PM   #1
pamamolf
LQ Newbie
 
Registered: Apr 2015
Posts: 7

Rep: Reputation: Disabled
Question SSH Tunnel for butty - (user without permissions for anything else)


Hello

I am using as root on Centos 6.6 tunneling and i am connecting to it using putty and socks on my Firefox and all working great..

Now i want to create another user to be able to use also tunnel but without any permissions for anything else in the server...

Any ideas how can i do it?Any easy way for this?

Can't find a Centos 6.x working tutorial
I found only for Ubuntu....google searching...

Thanks
 
Old 04-11-2015, 09:10 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by pamamolf View Post
I am using as root on Centos 6.6 tunneling
You should not (need to) do that as root user: please use an unprivileged user account instead.


Quote:
Originally Posted by pamamolf View Post
Now i want to create another user to be able to use also tunnel but without any permissions for anything else in the server...
Set this unprivileged users authorized_keys file entry to start with this stanza:
Code:
no-pty,no-agent-forwarding,no-X11-forwarding,command="/bin/false",permitopen="ipaddress:portnumber"
and see 'man sshd_config' and 'man ssh_config' for explanation.
 
Old 04-11-2015, 12:39 PM   #3
pamamolf
LQ Newbie
 
Registered: Apr 2015
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Set this unprivileged users authorized_keys file entry to start with this stanza:
Is it possible to not use authorized key and use plain user and password?And if yes then where i should add the:

Quote:
no-pty,no-agent-forwarding,no-X11-forwarding,command="/bin/false",permitopen="ipaddressortnumber"
At the moment i create a user:

Code:
useradd tunneluser
passwd tunneluser
and i create a group:
Code:
groupadd tunnel
then i add the user there:
Code:
useradd -G tunnel tunneluser
check that is ok:
Code:
id tunneluser
uid=502(tunneluser) gid=503(tunneluser) groups=503(tunneluser)
And now i don't know what to edit to fix the privileges...
 
Old 04-11-2015, 01:08 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by pamamolf View Post
Is it possible to not use authorized key and use plain user and password?
Yes but like using root for day to day tasks that's not a SSH Best Practice. Try to get accustomed to using ssh-agent or its Desktop Environment equivalent if loading keys bothers you.


Quote:
Originally Posted by pamamolf View Post
i don't know what to edit to fix the privileges.
What privileges? Explain?
 
Old 04-11-2015, 02:26 PM   #5
pamamolf
LQ Newbie
 
Registered: Apr 2015
Posts: 7

Original Poster
Rep: Reputation: Disabled
The user that i create is not root as you recommend me and also the group .....

Now i need to use this:

Code:
no-pty,no-agent-forwarding,no-X11-forwarding,command="/bin/false",permitopen="ipaddress:portnumber"
As it is the last step as you post above to make it work but i need some more instructions for this please....
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH Reverse Tunnel - ~/.ssh/config - PHP marcelp1 Linux - Newbie 1 05-28-2014 12:49 AM
SSH / FTP user permissions Juc1 Linux - Newbie 5 10-28-2012 06:40 PM
Initiate ssh tunnel to connect to ssh? brianmcgee Linux - Security 2 09-07-2011 10:07 AM
sftp user with limited ssh permissions to autologin using publickey blazingrock4u Linux - Security 1 10-18-2010 11:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration