1. Permission denied
Run ssh with verbosity mode to see why authentication is failing.
ssh -v -v -v username@hostLook in the logs.
/var/log/auth.loglook for messages that contain "sshd”
! In most cases password reset helps.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2. Can't ssh to server from WAN.
1. Run ssh with verbosity mode to see why authentication is failing.
2.
ssh -v -v -v username@host3. Look in the logs.
4.
/var/log/auth.logCheck in /etc/ssh/sshd_config
Look for line :
sshd_config ListenAddressIf there’s an record of an defined IP address, then SSH will only accept connections from that IP address.
If IP address is correct, and you still can’t connect, then :
Put your server in DMZ zone in your router.
Maybe your router is blocking loopback connections. It’s worth to check that.
Add port forward to your router’s configuration (Outside IP -> LAN IP) by adding option for 22 port.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ssh: connect to host server port 22: Operation timed out
Check for :
/etc/init.d/sshd start/etc/init.d/sshd statusor
sudo service ssh statussudo service ssh start|restart|stopIt’s quite rare, but you may want to call to your ISP office , and ask if they are blocking port 22.
If so , then you just change SSH listening port to some, what is allowed.
You can do that in :
/etc/ssh/sshd_config After changing your sshd_config (not ssh_config) on the server you must restart sshd. Reboot or :
pkill -SIGHUP sshd (this makes SSHD to recheck it’s config)More : confirm which port is being listened on,
sudo netstat -lntp Maybe firewall is blocking port :
sudo iptables –L! Usually in 90% cases, by changing port and restarting SSHD service you will get shell access.
0 comments :
Post a Comment
Comment: