ssh - disable direct root login


 
Thread Tools Search this Thread
Operating Systems Linux ssh - disable direct root login
# 1  
Old 04-14-2010
ssh - disable direct root login

Hi Guys....

I am a newbie to unix. I have a requirement. I have a server. I have to configure ssh to disable direct root login and then add a user with sudo access to this server.Then change the ssh port to 22315 and the server should permit the ssh only from my local machine ip.I also have to disable ping in this server.
Please help me by providing necessary details.
# 2  
Old 04-14-2010
See man sshd_config in general, but specifically the parts on the Port and PermitRootLogin.
See man sudoers for the configuration of sudo
See man iptables on how to block ICMP_ECHO_REQUESTS and put limits on the allowed source IPs
Alternatively, you can disable pings by setting /proc/sys/net/ipv4/icmp_echo_ignore_all to 1

For all other help: please be more specific on your task and what exactly you are stuck with.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Procedure to restrict direct access as root

Hello, I would like to confirm whether the below procedure is correct. disabled direct super user access on AIX server using below procedure. Please let me know if there is any additional step. 1) confirm the access to HMC, console to reach the LPARs 2) chuser rlogin=false root ... (3 Replies)
Discussion started by: dio34
3 Replies

2. AIX

Disabling SSH direct access for an AIX user

Hello everyone, Can anyone help me please. I want to disable SSH direct access for an AIX user. For example, if I have USER1 and USER2. I want to disactivate direct access for USER2. The user must enter his login (USER1) and his password and then he can do su - USER2 . Thanks, (3 Replies)
Discussion started by: adilyos
3 Replies

3. Solaris

Disable users to direct login

Hi all, how can I disable direct login to a Solaris system not only for root user but also for other accounts? Looking in google I came to the following: For telnet (/etc/default/login): disable root access> CONSOLE=/dev/console disable generic user> ? For ssh... (5 Replies)
Discussion started by: Evan
5 Replies

4. AIX

AIX Disable direct root login problems

I have disabled rlogin for root successfully , but after that i could not login to root from console and could not su to root from other users as it responded as expired account I did not have any admin user but I have managed to recover the situation by accessing rootvg before mounting it, but... (5 Replies)
Discussion started by: majd_ece
5 Replies

5. Solaris

Direct login without password

Hi, I am trying to setup direct login from server test1 (Solaris 10) to server test2 (Solaris 9) using id taops (ldap id). Process Followed on Test 2. created .rhosts file in home directory of user taops geneted public key on test1 and appended to authorized keys on test2. Now trying... (8 Replies)
Discussion started by: tuxian
8 Replies

6. UNIX for Dummies Questions & Answers

How to disable root login (Not over SSH)?

I have already disabled root login over the ssh by modifying /etc/ssh/sshd_config. But how would i disable root login on a server itself. We have implemented LDAP in our environment and our security guide states that root login must be obtained by first logging into the host using his/her own... (2 Replies)
Discussion started by: pinga123
2 Replies

7. Solaris

how to login with ssh to remote system with out applying the remote root/usr password

how to login with ssh to remote system with out applying the remote root/user password with rlogin we can ujse .rhosts file but with ssh howits possible plz guide (2 Replies)
Discussion started by: tv.praveenkumar
2 Replies

8. UNIX for Advanced & Expert Users

How to allow particular user only to login as a root using "ssh" ?

Q1 I want to allow particular user only to login into root using ssh. I have set PermitRootLogin no for security purpose but I want to allow some of the users to login as a root using ssh how to do this? I have tried with Allowusers user1 user2 its working for only the user1 and... (3 Replies)
Discussion started by: ungalnanban
3 Replies

9. Solaris

Remote ssh login as root

I edited my /etc/default/login file and commented the line: # If CONSOLE is set, root can only login on that device. # Comment this line out to allow remote login by root. # #CONSOLE=/dev/console I still cant login thru telnet or ssh. What else do i have to do to be able to login... (14 Replies)
Discussion started by: BG_JrAdmin
14 Replies

10. UNIX for Dummies Questions & Answers

Disable Root Console login

After Configuring a brand new netraT1, It appears, the only way you can log in as root is throught the Serial Port (console). I believe there is a file in /etc which can be edited to allow root to access login via other methods eg: telnet, ssh, etc. My Question: Which file contains... (2 Replies)
Discussion started by: SmartJuniorUnix
2 Replies
Login or Register to Ask a Question