Putty SSH connection refused
I don't really want to rebuild the server, but I can if I need to. Fairly new to this, so any tips or pointers are very appreciated.
2 Replies
use Lish
It's probably one of two things. First, check whether sshd is running:
`$ ps auwwwwx | grep [s]shd
root 3185 0.0 0.1 61372 1788 ? Ss Sep27 0:04 /usr/sbin/sshd -D`
If you don't get a line with /usr/sbin/sshd, then it is not running. Check your configuration file /etc/init/ssh.conf to make sure it's set to start. You should have this in that file:
`~~[code]~~start on runlevel [2345]
stop on runlevel [!2345]<e>[/code]</e>`
Then as root or using sudo, run **~~[b]~~initctl start ssh<e>[/b]</e>** to start the ssh daemon. If /etc/init/ssh.conf is set up properly as noted above, then ssh should automatically start when your server is rebooted.
If you find that sshd is running, the other possibility is that your firewall is not allowing traffic to port 22\. If you are using ufw, then running **~~[b]~~ufw allow 22<e>[/b]</e>** as root should open this port. Otherwise, let us know what you are using to manage your firewall.[/s]