LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   remote webserver and sshd_config file (https://www.linuxquestions.org/questions/linux-newbie-8/remote-webserver-and-sshd_config-file-879028/)

riderryuken 05-05-2011 12:10 PM

remote webserver and sshd_config file
 
I wanted to add a user to have permission to login to our webserver. Foolishly I did not back this file up. The only thing I changed was the last part of the file which was:

# override default of no subsystems
AllowUsers chris acosentino
Subsystem sftp /usr/libexec/openssh/sftp-server

to

# override default of no subsystems
AllowUsers acosentino techmaster
Subsystem sftp /usr/libexec/openssh/sftp-server

Now I'm still connected with that terminal, but any other attempt to get into the webserver from either a new terminal or from winscp results in:

ssh_exchange_identification: Connection closed by remote host

Please advise me as to what to do. If I lose connection to this last terminal I guess I'll be screwed.

gilead 05-05-2011 05:36 PM

Can't you just change it back from that terminal window and restart sshd? From your description that's what you did to get it to this configuration? I'm not sure which distro you're running but as an example, the Slackware sshd script restarts the ssh daemon by killing the listener process, not the already connected sessions. Doing that leaves your current session connected for you to continue working.

Make sure you check my assumptions before trying this though... If you kill all your ssh sessions accidentally before updating the config file then it becomes more difficult.

riderryuken 05-06-2011 07:15 AM

Apparently what happened is I must have tried to login 4 times with an incorrect login from the office (I don't remember doing so, I may have messed up the new login once or twice.) but somehow ended up in the deny hosts file.


All times are GMT -5. The time now is 05:14 AM.