Unable to connect with SSH
I am trying to use the transfer tool in WHM. There was some connection issues. So I tried to SSH into the server to see if it would work. Each time I use Putty it closes immediately after I enter my password. Is there anything I can check on the server to allow me to connect?
I tried using the terminal in WHM and looked at the logs # tail -f -n 50 /var/log/secure | grep sshd pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=xxx.xxx.xx.xx user=myname error: PAM: Authentication failure for myname from xxx.xxx.xx.xx Accepted keyboard-interactive/pam for myname from xxx.xxx.xx.xx port 58783 ssh2 pam_unix(sshd:session): session opened for user myname by (uid=0) pam_unix(sshd:session): session closed for user myname |
I don't know what's WHM. Obviously the ssh client was able to connect to the ssh server, but the server did not accept the password.
The easiest solution is resetting myname's password. |
berndbausch, WHM is likely the Web Host Manager.
OP, does your hosting provider offer tech support? If so, that might be the best place to direct your question. |
Web Host Manager, or WHM, is the program that allows administrative access to the back end of cPanel. Unfortunately they don't offer detailed support. Usually when things come up, I have to figure it out and learn. Yes the password has been changed. I have also posted on the cpanel forum but no replies yet.
One thing I noticed was this line in the config file. It doesn't say yes or no because its commented out. vi /etc/ssh/sshd_config # Authentication: #PermitRootLogin yes My new server that I can log in reads like this: PermitRootLogin no |
The sshd_config settings disable/enable root logins, not logins to account myname.
|
I wasn't sure if that could be the issue. "myname" is the root root/admin/main user of the server. If I purposely enter the wrong password it will say access denied. If I enter it correct the connection is terminated. Maybe I need to fix something in the pam settings?
|
Commented out entries in sshd_config typically reflect the defaults.
root is the only “root/main/admin” user of the server. Are you trying to connect as root? Or as a regular user? Obfuscating the IP address makes sense, but we need to know if you’re using root or some other user to connect. Typically, I will ssh to a remote server as an unprivileged user and su to root if I need to. |
I think my username is considered a "super user"? Its the main user for the server. I am not typing "root" when I login using putty. Since I can't get the transfer tool to connect and finish, there must be an issue but I don't know where to look.
|
Quote:
|
If you can connect to your system on an alternative port, one other than 22, then you can set up a one-off, verbosely logged SSH session there:
Code:
sudo /usr/sbin/sshd -d -d -d -p 2222 -E /tmp/sshd.log See "man sshd" for a more authoritative explanation of those options. |
Quote:
Another thing I noticed, it is not reporting any connections for my usuername but if i enter an incorrect password it will. I contacted my service provider of my VPS. They recommended repairing or reinstalling SSH. Does that sound like a possible fix? |
Quote:
I don't remember if WHM provides a browser-based SSH interface - if it does, I'd use that to try what Turbocapitalist posted and see if that provides further information. Or try enabling SSH access for another account in case it's a user-specific issue. (I'm assuming you have enabled and successfully used SSH previously for the account currently having trouble.) Otherwise, whilst uninstalling SSH, purging all config, then re-installing it *might* solve the issue, it might also screw up the link between it and cPanel/WHM and cause other issues (either now or at the next upgrade). Your best best is to talk to cPanel Support. cPanel is a paid product - if you're not paying for it, your hosting provider is - so you might as well take advantage of that to get the advice of those that know the product better than anyone here. |
Quote:
sudo /usr/sbin/sshd -d -d -d -p 2222 -E /tmp/sshd.log sshd: illegal option -- E OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013 usage: sshd [-46DdeiqTt] [-b bits] [-C connection_spec] [-c host_cert_file] [-f config_file] [-g login_grace_time] [-h host_key_file] [-k key_gen_time] [-o option] [-p port] [-u len] |
Have you ever successfully connected to the server with ssh? With this user - or any user?
|
Quote:
|
All times are GMT -5. The time now is 05:05 PM. |