marți, 24 februarie 2015

What to do when sshd is not working


# /etc/init.d/sshd start
Starting sshd: [ OK ]
# /etc/init.d/sshd status
openssh-daemon is stopped

 The best way to to debug is, guess what, to run the sshd in the debug mode:

/usr/sbin/sshd -dddd

Now you are capable to see where the problem is and where the config file is.
My case: /etc/ssh/sshd_config

Here, you should locate the bug. It could be a device problem (usually "dev/null" is a regular file and you should remove it and recreate with mknod command), an ip address problem, a wrong port, etc...

Make the proper settings and run again:

/etc/init.d/sshd start

Now, if you are still in trouble, because the authorized keys, look in the same config file and mind the paths to the key files and the rest of the settings. 

The ssh-agent:

#ssh-agent -s

Agent pid 3426

You may generate a new ssh key:

#ssh-add -l

If u are still in trouble, let me know!

Niciun comentariu:

Trimiteți un comentariu