In Crux Linux I already have installed SSH but when I use ssh-keygen, and try to use the command:ssh localhostto test SSH I get this error:# ssh localhostssh: connect to host localhost port 22: Connection refused#So I decided to reinstall openssh but without apt-get I don't know how to do that.
How to install openssh in Crux Linux
linux;ssh;openssh;sshd;crux
You have the client (and, I believe, also the server) installed. But you're not running the server on your machine (it's not started by default on Crux).Add sshd to the SERVICES setting in /etc/rc.conf. See the handbook. This will take care of starting the SSH server at boot time. For now, run /etc/rc.d/sshd start.As per the FAQ, you may want to customize /etc/hosts.allow or /etc/hosts.deny first. Note that these files offer hostname-based protection, which is not always trivial to circumvent but far from absolute nonetheless. Ssh itself provides good protection against intruders (as long as you don't enable passwords, or make sure every user has a high-entropy password), so I recommend allowing SSH access to all (sshd: ALL in /etc/hosts.allow).