deeks Posted January 30, 2017 Share Posted January 30, 2017 Hi all, I have trouble logging into terminal using SSH, message in terminal is "connection refused". Somehow i do not seem to be able to connect anymore. The SSH plugin from Docgyver (nice work btw) indicates SSH is not running. How do I find out why this is happening? Cheers, Deeks! Quote Link to comment
John_M Posted January 30, 2017 Share Posted January 30, 2017 By looking at your diagnostics (Tools -> Diagnostics) or by posting them here. EDIT: if you can log in at the console or telnet it try this: ps aux | grep sshd If it returns something like this root 1558 0.0 0.0 24492 3216 ? Ss Jan03 0:00 /usr/sbin/sshd then the ssh daemon is running. Quote Link to comment
deeks Posted January 30, 2017 Author Share Posted January 30, 2017 Should have attached the diagnostics right away but here it is. After skimming it, i still do not understand why unRAID is not listening to port 22. Did I miss a cue ? unraid-diagnostics-20170130-1945.zip Quote Link to comment
deeks Posted January 30, 2017 Author Share Posted January 30, 2017 Should have attached the diagnostics right away but here it is. After skimming it, i still do not see why unRAID is not listening to port 22. Did I miss a cue ? unraid-diagnostics-20170130-1945.zip Quote Link to comment
deeks Posted January 30, 2017 Author Share Posted January 30, 2017 yes I can telnet: root@unRaid:~# ps aux | grep sshd root 4739 0.0 0.0 9652 1956 pts/1 S+ 21:00 0:00 grep sshd Quote Link to comment
itimpi Posted January 30, 2017 Share Posted January 30, 2017 SSH should be enabled by default in the current unRAID releases without needing any plugins. I wonder if one of the plugins you are installing is overwriting files relating to the version included with unRAID? Quote Link to comment
John_M Posted January 30, 2017 Share Posted January 30, 2017 The ssh daemon isn't running. Quote Link to comment
trurl Posted January 30, 2017 Share Posted January 30, 2017 Should have attached the diagnostics right away but here it is. After skimming it, i still do not see why unRAID is not listening to port 22. Did I miss a cue ? I merged your topics. Please don't start duplicate threads. Quote Link to comment
John_M Posted January 30, 2017 Share Posted January 30, 2017 You don't need a plugin to make ssh work. Try removing the plugin and see if that fixes it. The ssh daemon might be getting disabled here: Jan 30 17:17:11 unRaid emhttp: cmd: /usr/local/emhttp/plugins/ssh/scripts/rc.ssh disable 22 -1 no 6 yes no no Jan 30 17:17:30 unRaid emhttp: cmd: /usr/local/emhttp/plugins/ssh/scripts/rc.ssh enable 22 -1 no 6 yes no no Jan 30 17:17:42 unRaid emhttp: cmd: /usr/local/emhttp/plugins/ssh/scripts/rc.ssh buttonstart Jan 30 17:22:19 unRaid emhttp: cmd: /usr/local/emhttp/plugins/ssh/scripts/rc.ssh enable 22 -1 yes 6 yes no no Jan 30 17:22:31 unRaid emhttp: cmd: /usr/local/emhttp/plugins/ssh/scripts/rc.ssh enable 22 -1 no 6 yes no no Jan 30 17:22:42 unRaid emhttp: cmd: /usr/local/emhttp/plugins/ssh/scripts/rc.ssh buttonstart Jan 30 17:30:01 unRaid emhttp: cmd: /usr/local/emhttp/plugins/ssh/scripts/rc.ssh buttonstart Jan 30 17:30:01 unRaid speedtest: Internet bandwidth test started Quote Link to comment
deeks Posted January 30, 2017 Author Share Posted January 30, 2017 I merged your topics. Please don't start duplicate threads. Thanks for merging TRURL, I messed up there ;-) Quote Link to comment
deeks Posted January 30, 2017 Author Share Posted January 30, 2017 @John_M: I agree that a plugin should normally not be required, I installed those after finding SSH did not work. The plugin enables me to start ssh via interface...was my thought. Quote Link to comment
John_M Posted January 30, 2017 Share Posted January 30, 2017 Restart the server in safe mode and see if you can ssh in to it. Quote Link to comment
deeks Posted January 31, 2017 Author Share Posted January 31, 2017 Thanks, will report back a little later on that - work has been bogging me down a little :-( Quote Link to comment
deeks Posted February 3, 2017 Author Share Posted February 3, 2017 Hi again, starting in safe mode does not allow me to log on via SSH. Same message: connection refused. How can I start the SSH daemon manually? Maybe this throws an error. Quote Link to comment
gubbgnutten Posted February 3, 2017 Share Posted February 3, 2017 Check the contents of /boot/config/ssh, do you have zero bytes keys there? Quote Link to comment
deeks Posted March 15, 2017 Author Share Posted March 15, 2017 Hi Gubbnutten, yes all zero bytes here...not good I guess. Any thoughts on how to resolve? Cheers, Deeks Quote Link to comment
deeks Posted March 15, 2017 Author Share Posted March 15, 2017 By the way, here's the screenshot... just beining curious, what do the asterisks behind the file mean? Quote Link to comment
gubbgnutten Posted March 15, 2017 Share Posted March 15, 2017 24 minutes ago, deeks said: Hi Gubbnutten, yes all zero bytes here...not good I guess. Any thoughts on how to resolve? Cheers, Deeks Should be safe to just delete them and restart the server. Quote Link to comment
deeks Posted March 15, 2017 Author Share Posted March 15, 2017 After reboot the deamon was running again. All I had to do was edit known_hosts on my macbook from which I usually connect and throw away the lines referring to my unraid box. Now I can connect to SSH again. Happy as Larry! Thanks heaps Gubbgnutten!! ps. The reason why this thread was an the SSH community plugins not working, of course the are now working beautifully as well Quote Link to comment
gizmer Posted July 15, 2017 Share Posted July 15, 2017 Hi experts, I have a similar problem regarding SSH access. After I installed "DenyHosts" und "SSH Config Tool" plugins and uninstalled them again I'm not able to login to SSH anymore. Pytty says "Access denied". Telnet is still working and this is the output from ps aux | grep sshd: root 1739 0.0 0.0 24500 3204 ? Ss Jul14 0:00 /usr/sbin/sshd root 26054 0.0 0.0 9656 1868 pts/4 S+ 18:52 0:00 grep sshd If there are some changed SSH settings is it possible to reset them to default values? Can someone advice please? PS I've tried to reinstall the SSH Config Tool, but the installation script returned an error: plugin: installing: https://raw.githubusercontent.com/docgyver/unraid-v6-plugins/master/ssh.plg plugin: downloading https://raw.githubusercontent.com/docgyver/unraid-v6-plugins/master/ssh.plg plugin: downloading: https://raw.githubusercontent.com/docgyver/unraid-v6-plugins/master/ssh.plg ... done plugin: downloading: https://github.com/docgyver/unraid-v6-plugins/releases/download/ssh/read_me.txt ... done plugin: run failed: /bin/bash retval: 1 Quote Link to comment
deeks Posted July 15, 2017 Author Share Posted July 15, 2017 Gizmer, Not sure if my ssh issue had abrelations to the plug-ins. Try editing the known hosts as suggested by Gubbhnutten. It worked for me. deeks Quote Link to comment
gizmer Posted July 15, 2017 Share Posted July 15, 2017 1 hour ago, deeks said: Gizmer, Not sure if my ssh issue had abrelations to the plug-ins. Try editing the known hosts as suggested by Gubbhnutten. It worked for me. deeks Hi Deeks, I got it! Had to modify /boot/config/ssh/sshd_config and set PermitRootLogin to yes and then restart SSHD with /etc/rc.d/rc.sshd restart. gizmer Quote Link to comment
deeks Posted July 15, 2017 Author Share Posted July 15, 2017 Good to hear Gizzo :-) Quote Link to comment
ksignorini Posted January 8, 2019 Share Posted January 8, 2019 Very similar issue here although this thread is already six months old. I get "Permission Denied" when I try to ssh in. Using telnet I moved /boot/config/ssh to a new name and restarted ssh as above. It recreated the ssh directory with new keys. The old directory had a sshd_config file of 0 bytes. After rebooting, I can't get sshd to run. Looking at sshd_config, I see that there is a new one there but it's all default values--read: broken. Would someone be able to send me working sshd_config so I can compare and get one running on my end? Thanks! Quote Link to comment
trurl Posted January 8, 2019 Share Posted January 8, 2019 1 minute ago, ksignorini said: thread is already six 18 months old. FTFY Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.