Showing posts with label SSH. Show all posts
Showing posts with label SSH. Show all posts

Sunday, 11 December 2011

Disable root SSH login : How to ??

Disable Root SSH Login on HP UX

# cd /opt/ssh/etc

# vi sshd_config

Change the line:

PermitRootLogin yes

change into like below

PermitRootLogin no

save and exit

Then stop and restart SSH.

# /sbin/init.d/secsh stop

# /sbin/init.d/secsh start

You will then NOT be allowed to ssh as root.

==============================================


Disable Root SSH Login on Linux


#vi /etc/ssh/sshd_config

Find this section in the file, containing the line with “PermitRootLogin” in it.

#LoginGraceTime 2m
#PermitRootLogin no
#StrictModes yes
#MaxAuthTries 6

Make the line look like this to disable logging in through ssh as root.

PermitRootLogin no

Then restart the sshd service:

# /etc/init.d/sshd restart

Wednesday, 23 November 2011

SSHD Service start /stop in HP-UX

HP-UX SSHD System Startup and Shutdown script:

#/sbin/init.d/secsh {start|stop}

System startup configuration file

/etc/rc.config.d/sshd

Stop HP UX SSH Service
Type the command:

# /sbin/init.d/secsh stop

Start HP UX SSH Service
Type the command:

# /sbin/init.d/secsh start