LinuxQuestions.org
Visit Jeremy's Blog.
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 09-15-2010, 01:08 AM   #1
dinakumar12
Member
 
Registered: Mar 2010
Location: INDIA (chennai)
Distribution: centos
Posts: 271
Blog Entries: 7

Rep: Reputation: 18
securing ssh logins


Hi all,

we have a public server and it can be accessed from any where through ssh.

My question is my server should not allow anyone directly to login as root user. First he should login as normal user then he should switch to root user.

is it possible.if possible how to achieve this.suggestions please.

I also have another questions is there any specific linux command is there to end other users ssh session without rebooting the server.

Thanks&regards,
Dinesh.

Last edited by dinakumar12; 09-15-2010 at 01:23 AM.
 
Old 09-15-2010, 01:19 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,038

Rep: Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408Reputation: 1408
Hi,

Quote:
Originally Posted by dinakumar12 View Post
My question is my server should not allow anyone directly to login as root user. First he should login as normal user then he should switch to user.
In your /etc/ssh/sshd_config (or similar)
Code:
PermitRootLogin no
I also have another questions is there any specific linux command is there to end other users ssh session without rebooting the server.

You can do something like
Code:
ps aux | grep ssh
Then note the pid of the process and kill it:
Code:
kill <pid>
Cheers,

Evo2.
 
1 members found this post helpful.
Old 09-15-2010, 01:40 AM   #3
dinakumar12
Member
 
Registered: Mar 2010
Location: INDIA (chennai)
Distribution: centos
Posts: 271

Original Poster
Blog Entries: 7

Rep: Reputation: 18
Hi,

Thank you very much, it works.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 will not allow root logins paidbythehour Solaris / OpenSolaris 13 08-14-2009 08:32 AM
Securing SSH ZilverZtream Linux - Security 5 12-10-2004 03:33 PM
Need help using Webmin to tell SSH to allow logins Xolo Linux - Security 9 11-22-2004 03:57 PM
securing ssh robberttheman Linux - Security 8 08-27-2004 07:36 AM
Securing SSH tarballedtux Linux - Security 3 11-16-2002 04:45 AM

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

All times are GMT -5. The time now is 08:00 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration