Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SSH Not Running?

Featured Replies

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!

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.

 

  • Author

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

  • Author

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

  • Author

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

  • Community Expert

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?

The ssh daemon isn't running.

  • Community Expert

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.

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

  • Author

 

I merged your topics. Please don't start duplicate threads.

 

Thanks for merging TRURL, I messed up there ;-)

  • Author

@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.

Restart the server in safe mode and see if you can ssh in to it.

 

  • Author

Thanks, will report back a little later on that - work has been bogging me down a little :-(

  • Author

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.

 

Check the contents of /boot/config/ssh, do you have zero bytes keys there?

  • 1 month later...
  • Author

Hi Gubbnutten, yes all zero bytes here...not good I guess. Any thoughts on how to resolve?

Cheers, Deeks

  • Author

By the way, here's the screenshot... just beining curious, what do the asterisks behind the file mean?

Screen Shot 2017-03-15 at 10.21.51.png

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.

  • Author

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!!:D

 

ps. The reason why this thread was an the SSH community plugins not working, of course the are now working beautifully as well

  • 4 months later...

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

  • Author

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

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

  • Author

Good to hear Gizzo :-)

  • 1 year later...

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!

  • Community Expert
1 minute ago, ksignorini said:

thread is already six 18 months old.

FTFY

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.