1753970 Members
7343 Online
108811 Solutions
New Discussion юеВ

Removing SSH

 
frederick hannah
Super Advisor

Removing SSH

How do I remove ssh? I have swremoved the zlib and openssl binaries, but the ssh process is still active. Do I kill the process>
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: Removing SSH

ps -ef | grep ssh

get the process id and issue a kill -9 for the process.

I'm attaching a script called gkill that does the same thing.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Patrick Wallek
Honored Contributor

Re: Removing SSH

Yes, at this point you probably do need to kill the process. Since you have already removed the binaries, there isn't much hope of a graceful shutdown, so a kill is probably your only option at this point.

You should also look in /sbin/init.d for an SSH script to start/stop it automatically at boot. Also look through /sbin/rc?.d for the S* and K* scripts for SSH that link back to /sbin/init.d. You probably also need to have a look in /etc/rc.config.d for an SSH related files as well.

Massimo Bianchi
Honored Contributor

Re: Removing SSH

Hi,
How was it installed ?

if it was installed with swinstall, then swremove will tear it away.

Otherway:


check /etc/inittab, comment the line and after
issue a

init q

to have the system re-read the changed config.

after that, kill sshd.

Take care in the "init q" phase, i know it has to be done so, but i have had never the need to use it.

Massimo



frederick hannah
Super Advisor

Re: Removing SSH

I think I am in the clear. I thought I had fouled-up the works. I stopped the ssh process with /sbin/init.d/sshd stop, unlinked the S* and K* scripts from sshd, and deleted the executable sshd. If I have missed anything, let me know. And thanks a tetra for your help
Caesar_3
Esteemed Contributor

Re: Removing SSH

Hello!

If you installed it with swinstall so
from what you wrote you didn't remove
the openssh, if you needed to remove the
script of it.
Check if you have /opt/ssh or /opt/openssh
This you also need to remove.

Caesar