By MACboyet
Hi,
After editing sshd_config to enable remote login - I wasn’t able to log into SSH again. the bad thing was, I exited SSH so I can’t log into SSH again.
here’s the error OpenSSH_6.9p1, LibreSSL 2.1.7 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 21: Applying options for * debug1: Connecting to [myIP] port 22. debug1: connect to address [myIP] port 22: Connection refused ssh: connect to host [myIP] port 22: Connection refused
Is there a solution to log in back to SSH? Should I log into console and then do anything?
Please help, thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Ok for those of you having problems like this - make sure the sshd_config file has no syntax errors. In my case, there was an additional(unwanted) space that I have to delete. Thanks!
If your root user has a password set you can log in via the console in the control panel. From there you should be able to edit sshd_config to revert your changes and restart the ssh service with
service ssh restart
Then you should be able to make an ssh connection again.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.