1828617 Members
5114 Online
109983 Solutions
New Discussion

How to stop ssh service?

 
SOLVED
Go to solution
zhaidc_1
Occasional Contributor

How to stop ssh service?

My system: HP-UX 11.11 HP Rp8400
I want to stop the ssh service,how can I do?
8 REPLIES 8
Arunvijai_4
Honored Contributor

Re: How to stop ssh service?

You can kill sshd daemon

# ps -ef |grep -i sshd
# kill -9
-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Arunvijai_4
Honored Contributor
Solution

Re: How to stop ssh service?

Also,
#/sbin/init.d/secsh stop

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
zhaidc_1
Occasional Contributor

Re: How to stop ssh service?

Thank you My friend!
Muthukumar_5
Honored Contributor

Re: How to stop ssh service?

If you want to temporarily stop ssh service then,

# /sbin/init.d/ssh stop

or kill sshd process ID

To permanetly stop ssh service then,

To go to your run level then remove startup script.

Example: run level 3
# cd /etc/rc3.d/
# rm -f *ssh*

Note: It is a link file to /sbin/init.d/ssh service so that you can add in future with link.

hth.
Easy to suggest when don't know about the problem!
Henk Geurts
Esteemed Contributor

Re: How to stop ssh service?

To stop permanently you can also remove the software:
# swremove $(swlist |grep -i "secure shell" |cut -f 1)
Arunvijai_4
Honored Contributor

Re: How to stop ssh service?

To remove Secure Shell permanently,

# swremove T1471AA

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Ranjith_5
Honored Contributor

Re: How to stop ssh service?

Hi,

Do the following

#vi /etc/rc.config.d/sshd

change SSHD_START=1

to SSHD_START=0

now stop sshd

#/sbin/ssh/secsh stop

This will stop ssh starting automatically during system startup. But be informed that secure shell gives you more security than telnet.


Regards,
Syam


Muthukumar_5
Honored Contributor

Re: How to stop ssh service?

Service name is /sbin/init.d/secsh not (/sbin/init.d/ssh) :(

Temporary Stop:

a) /sbin/init.d/secsh stop
b) kill -9

Permanent Stop:

a) /etc/rc.config.d/sshd
SSHD_START=0

b) Remove run level script (/etc/r3.d/*secsh*)

c) Remove Secure Shell package

hth.
Easy to suggest when don't know about the problem!