I am being tasked to remove ssh-keygen from Ubuntu servers and I don't want to break the computer. Can you please help, how to uninstall ssh-keygen utility safely?
Thanks
I am being tasked to remove ssh-keygen from Ubuntu servers and I don't want to break the computer. Can you please help, how to uninstall ssh-keygen utility safely?
Thanks
You can easily check what package a file belongs to on Debian based systems using dpkg -S
user@host:~$ which ssh-keygen
/usr/bin/ssh-keygen
user@host:~$ dpkg -S /usr/bin/ssh-keygen
openssh-client: /usr/bin/ssh-keygen
So, the file belongs to openssh-client
. The clean way would be to remove that package.
user@host:~$ sudo apt remove openssh-client
This will of course remove the ssh client completely. If that is not what you want, you can just remove or replace the binary. I'd guess changes are low that it is used by other packages.
As noted by Michael Hampton this is not really an option since it would just reappear when the package is updated.
Or you could replace openssh-client
with lsh-client
, which is another implementation of the SSH2 protocol. The package doesn't seem to contain other tools for key management, but I have no experience using it.