columbusgeek

Member
Nov 30, 2007
8
1
53
Hi all

I was securing a server today, going though the usual steps. Adding CSF, etc. I was logged in via SFTP as well as SSH in a terminal window with no problems.

I made a change to /ssh/sshd_config and saved it and restarted the service. Turns out the edit I made was incorrect in some way and would not allow SSH to restart. This of course locked me out of making any changes via SSH or SFTP.

Pretty big bummer eh?

It was a dumb mistake, I admit. Anyhow, I discovered you can reset your SSH configuration by going to the "fix your SSH" url. (http://server-ip:2086/scripts2/doautofixer?autofix=safesshrestart)
I can now login via SSH, but SFTP does not work. Transmit, (my ftp client) tells me that "the user name or password was not accepted by the server". Odd since I can login with that username (root) and password via SSH

I tried a cpanel force upgrade and it didnt help.

Any ideas? It's not the client, I tried another as well.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
Can you post the contents of your /etc/ssh/sshd_config file here? Please remove any lines that are commented out so that the file is smaller and easier to read.

I am thinking that this line might be missing from the file:

Code:
Subsystem	sftp	/usr/libexec/openssh/sftp-server
It is typically at the bottom of the file and allows sFTP access. If it is missing, sFTP wouldn't work.
 

columbusgeek

Member
Nov 30, 2007
8
1
53
Thanks cPanelTristan

I was able to login via ssh using the url fix, and once I did that, I navigated to the sshd_config file, found the error in the line I made and repaired that, restarted, then SFTP was back in business.
I think when I was looking for the mis-entered line yesterday I must have overlooked it somehow.

Too much caffeine.

Thanks again.