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.

Guide to getting SSH working?

Featured Replies

Is there any guide to getting SSH working? I don't believe my daemon is running, and when I tried manually running it (/etc/rc.d/rc.sshd) it tells me

key_load_public: invalid format

Could not load host key: /etc/ssh/ssh_host_rsa_key

key_load_public: invalid format

Could not load host key: /etc/ssh/ssh_host_dsa_key

key_load_public: invalid format

Could not load host key: /etc/ssh/ssh_host_ecdsa_key

key_load_public: invalid format

Could not load host key: /etc/ssh/ssh_host_ed25519_key

Disabling protocol version 2. Could not load host key

sshd: no hostkeys available -- exiting.

 

I tried moving the generated keys from /boot/config/ssh to /etc/ssh but that didnt work either.

Your current host keys might be corrupt.

delete them with

rm /etc/ssh/ssh_host_*key* /boot/config/ssh/ssh_host_*key*

then start sshd with

/etc/rc.d/rc.sshd start

 

  • Author

Thanks! that worked in starting it up.

 

ah...as a side note, do you know if theres a default username/password? When attempting to login I'm getting Access denied! (using root)

The web login is the same as the shell login.

so the default is no password needed

 

when a password is set in the web GUI, this password will be needed to login over telnet or SSH or the console as well.

  • Author

hmm, thanks.

 

for some reason the same password as my web GUI isn't working. Do you happen to know if theres anyway to reset it? (either that, or I cant recall my password at all :P)

 

telnet works, but SSH keeps giving me access denied

  • 1 year later...

Okay, so I ran into a similar issue, found this post when googling, and normally I don't like to resurrect dead posts but I figured I'd round out the answer for future users who may find it helpful.

 

On 9/16/2015 at 5:53 PM, ken-ji said:

Your current host keys might be corrupt.

delete them with

 


rm /etc/ssh/ssh_host_*key* /boot/config/ssh/ssh_host_*key*
 

 

then start sshd with

 


/etc/rc.d/rc.sshd start
 

 

This works. When you start sshd it will generate keys appropriately. The problem is that it's storing them in /etc/ssh/, which isn't preserved across reboots.

 

The solution is to move the newly generated keys to the flash drive, where unraid will copy them into their proper location as part of its booting process.

 

cp /etc/ssh/ssh_host_*key* /boot/config/ssh/

I tested by rebooting and sshing after I did this copy command and it does indeed work, but I didn't test before copying the keys so if unraid auto copies the keys on shutdown or anything like that and my advice is redundant I apologize, but I know for a fact this works.

Quote

sshd_start() {
  # make sure ssh dir exists on flash
  mkdir -p /boot/config/ssh
  # restore saved keys, config file, etc.
  cp /boot/config/ssh/* /etc/ssh &>/dev/null
  chmod 600 /etc/ssh/* &>/dev/null

  # Create host keys if needed.
  ssh-keygen -A

  # copy any new/generated key back to flash drive
  cp /etc/ssh/ssh_host*_key* /boot/config/ssh/

  /usr/sbin/sshd
}

 

Its redundant... :D the snippet above is from the /etc/rc.d/rc.sshd script

Archived

This topic is now archived and is closed to further replies.

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.