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.

OpenSSH Plugin & companion Plugin DenyHosts for unRAID 5b11+ (v6 vers available)

Featured Replies

openssl updated to openssl-0.9.8y-i486-1_slack13.1.txz so the plugin doesn't install  ;)

  • Replies 177
  • Views 50.5k
  • Created
  • Last Reply
  • Author

openssl updated to openssl-0.9.8y-i486-1_slack13.1.txz so the plugin doesn't install  ;)

 

I'll update the plugin shortly.

  • Author

 

Telnet is not safe when connectiong remotely.

Also I think it's strange that in the OP it lists "root login with password" as possible, but "root login with private/public key pairs" not possible?

The first is clearly the more insecure alternative of them two...

In my book, and i guess in everyone else who's concerned about safety, private/public key pairs trump passwords...

 

Its harder to do private/public key with root as the home directory is not persistent across reboots....

 

Personally I ssh as sshuser (which I have set up with a persistent home directory) and then just su my way to root if needed..  Although I must work out why I can't do somethings as sshuser that I can with other users..

 

Chris

 

Well, I have modified my go script to copy the files in the .ssh directory from their backup location on the flash drive ("/boot/scripts/root/.ssh/" in my case) to the /root/.ssh directory during startup.

 

It should not be hard to modify the plugin to support key pairs for the root user.

It would be nice to have support for root login with key pairs, as it's safer than root login with password.

 

Well as one of the developers for XBMC is fond of saying, patches are always welcome.

 

On a less sarcastic note, as previously mentioned I have a rewrite I was working on but as yet I don't have sufficient time with which to finish it. The reason the plugin doesn't allow root and therefore ssh keys is due to the hacky way I add and modify the ssh user.  I've found a much cleaner way since and so I'll do a minor update to this plugin such that you can select root as your ssh user and the plugin will allow the ssh keys to be used for roots home directory instead.

 

I'll try to get this done sometime in the week to come.

 

 

Regards,

overbyrn

since i have installed this plugin, i am getting frequent issues with my user shares not mounting. can anyone suggest a fix for this?

openssl updated to openssl-0.9.8y-i486-1_slack13.1.txz so the plugin doesn't install  ;)

 

I'll update the plugin shortly.

 

Thank you  ;)

I'm sorry, but I really need it. More or less, can you tell me when will be updated?

 

Thank you  ;)

  • Author

I'm sorry, but I really need it. More or less, can you tell me when will be updated?

 

Thank you  ;)

 

Njon, can you clarify what it is you need?  Do you need the plugin to do something that it currently doesn't or are you simply wanting the plugin to install and work as it is right now?  I amended the plugin to account for the recent change in URL, so if all you need is the plugin to install correctly then you should be able to re-download a copy from the link in my first post and install successfully from there. 

 

 

Regards,

overbyrn

I only wanted to install the plugin  :)

 

Thank you!

  • 1 month later...
  • Author

FYI, big plugin rewrite 99% complete.  Have taken on board some of the suggestions and features others would like.  Probably won't please everyone, but that's a tall order.

 

The most notable change is that of user selection.  I've designed the plugin to check for existing users and present them as valid choices for enabling SSH. 

 

Valid users are those users with a UID of 1000 or higher.  In other words, any user which is not a 'system' user as coming standard in UnRAID.  The exeption to this is user root, who can be chosen. 

 

When a user is created from within the standard UnRAID webgui, it is automatically assigned a user ID (UID) of 1000 or greater.  From my experiments in creating users by hand from command line via useradd, they also get a UID >= 1000.  So my thinking is that unless you have some really weird setup, it's safe to assume all users with a UID of 1000 onwards as valid.

 

Management of all users should be via the standard User page of UnRAID webgui (or command line if you're so inclined).  That allows me to removing any function of creating or changing users in my plugin.  No users get deleted, no users have their login credentials changed.  All the plugin has to do is to ensure the user has a valid home directory and shell. 

 

The best bit, you can select multiple users for SSH.

 

For each user, it'll create a regular /home/someuser directory and a sub-directory under the plugin.  The latter is so that you can manually dump a public key into there.  If it finds one, it'll copy it to the users regular home dir. 

 

In time I'd like to be able to manage the generation of key pairs from within the plugin, but for now this gives you the chance to create a key pair(with or without a passphrase) and dump a copy for a given user on the flash.  As each user has their own dir on flash, you can have multiple keys.

 

The plugin is self updatable.  ie. I've moved development to GitHub and built in a simple plugin version check and update.  Should mean I can squash the inevitable bugs that'll come out of such a big re-write.

 

As I say, I'm 99% complete.  If anyone wants to be an early tester please drop me a PM.

 

 

Kind Regards,

overbyrn

  • Author

All,

 

First post updated with details of new SSH plug-in.

 

 

 

Regards,

overbyrn

Thanks Overbyrn - I've installed your plugin and it's working flawlessly.  I've been looking for a properly-behaving integrated OpenSSH package for a while now, so I can do some fancy shutdown stuff via Plink -> SSH, controlled by apcupsd on another box.  This has worked a treat!

  • Author

Thanks Overbyrn - I've installed your plugin and it's working flawlessly.  I've been looking for a properly-behaving integrated OpenSSH package for a while now, so I can do some fancy shutdown stuff via Plink -> SSH, controlled by apcupsd on another box.  This has worked a treat!

You're very welcome.  Glad to hear it's working.  Shout if you hit any issues.  I'm always a tad nervous when putting out new stuff.  Also, let me know if you can think of anything that needs adding or could be done better.  I'll try to oblige.

  • Author

FYI, also updated companion plugin DenyHosts.  Now all of the DenyHosts settings can be controlled from the webgui

 

Please see second post in this thread for details.

 

 

 

Regards,

overbyrn

Really beautiful!

Only a little problem: in "Settings -> OpenSSH" the local version of the pugin is UNKNOWN. I did nothing except installing the new version over the old one. Is it normal?

I'm not having the issue here, it's showing correctly as:

 

OpenSSH Version: OpenSSH_5.9p1, OpenSSL 0.9.8n 24 Mar 2010

 

 

 

Plugin Local Version Online Version

SSH Plugin v1.1             v1.1

  • Author

Really beautiful!

Only a little problem: in "Settings -> OpenSSH" the local version of the pugin is UNKNOWN. I did nothing except installing the new version over the old one. Is it normal?

I'm assuming you mean from here...

 

F2JQyTN.png

 

If so, the plugin extracts the version from the locally downloaded copy of the plg file you have saved to your flash plugins dir.  It'll say unknown if it had a problem doing that.  The only thing I can think of is if it couldn't access the plugin file.  Stupid question, but did you rename it?  It's hardcoded to look for "/boot/config/plugins/openssh_overbyrn.plg"

 

Also, you might try testing it from command line for me. 

 

/etc/rc.d/rc.ssh getver plg local

 

Should give the response:

 

1.1root@Tower:~#

 

Note the 1.1 at the start of the line.

 

 

The plg is the folder "/boot/plugins/...." so that's the problem! so you suggest to put all my plugins in the "config" directory?

Thank you  ;)

 

  • Author

The plg is the folder "/boot/plugins/...." so that's the problem! so you suggest to put all my plugins in the "config" directory?

Well, that's a good question. 

 

It seems with latest SimpleFeatures, /boot/plugins came into existence in addition to /boot/config/plugins. 

 

I'm yet to find a post that explains why this is and which one is correct.  I've seen people mention that /boot/plugins is the new way forward, but can someone point me to a post by Tom stating this?  It's been asked in the SF thread, but I don't recall seeing a conclusive answer.  I'll support whatever directory is the correct one, but need clarification on this before making any extra work for myself.

 

For now, your problem will go away if you revert to using /boot/config/plugins.

 

 

Regards,

overbyrn

 

 

EDIT: found this link to a post by Tom stating what plugin dir is what:

http://lime-technology.com/forum/index.php?topic=14665.msg138228#msg138228

 

a) install slack packages from /boot/extra

b) install all /boot/plugins/*.plg files  (ie, "system" plugins)

c) install all /boot/config/plugins/.plg files  (ie, "user" plugins)

d) invoke 'go' script

 

At present time there are no "system" plugins (though the webGui itself and the simple file browser, called indexer, are "pre-installed" plugins).  But in future, when one upgrades the release by copying bzimage and bzroot, might also require to copy contents of "/boot/plugins" as well.

 

So, only UnRAID 'system' plugins - should be in /boot/config.  Everything else should be considered 'user' and therefore live in /boot/config/plugins.  I'll continue to leave my plugins in /boot/config/plugins as surely all plugins (with the possible exception of SimpleFeatures) are in addition to the core features UnRAID provides and therefore should continue to live in /boot/config/plugins.  I don't need a crystal ball to see this is going to lead to a world of confusion as a quick search for both paths on the forum shows other plugin developers have already switched to using /boot/plugins instead.  :-X

Hi

I've installed this as way to get an ssh client to connect to my seedbox. The ultimate aim is to automate download of completed material through rsync and cron.

 

I've set up the public private key pair and they are saved in persistent storage. However I dont know how to prevent unraid asking for the seedbox to be re-entered into the known hosts file after an unraid reboot.

 

I understand that

UserKnownHostsFile /dev/null
StrictHostKeyChecking no
IdentityFile /mnt/user/eric/.ssh/id_rsa

will do what I want if entered into /etc/ssh/ssh_config.

 

But then I run into a second problem; how do I make ssh_config persistent? (I've added these lines to /boot/config/plugins/ssh/ssh_config but they are not being replicated into /etc/ssh_config).

 

Alternatively is there an easier way to do this from the command line. At the moment I am using

rsync -r [email protected]:/path/to/content/* /mnt/user/path/to/location/on/unraid/

which fails with rsync error number 255.

Thx

Eric

Thank you for the plugin, sshd is working for me. Just wanted to provide some feedback. My install reported some errors during the install.

 

# installplg openssh_overbyrn.plg

Deprecated: Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0

 

Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0

 

Everything else was successful.

 

In the SimpleFeatures v1.0.11 UI I also have this error:

 

Deprecated: Comments starting with '#' are deprecated in /boot/config/plugins/ssh/ssh.cfg on line 1 in /usr/local/emhttp/plugins/ssh/ssh.php on line 2

 

I'm not sure if this is an error or I am misunderstanding the information:

sshduierror1.jpg

sshd_ui_error1.jpg.36e768201fc29b3af3d7b419924ff094.jpg

  • Author

Thank you for the plugin, sshd is working for me. Just wanted to provide some feedback. My install reported some errors during the install.

 

# installplg openssh_overbyrn.plg

Deprecated: Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0

 

Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0

 

Everything else was successful.

 

In the SimpleFeatures v1.0.11 UI I also have this error:

 

Deprecated: Comments starting with '#' are deprecated in /boot/config/plugins/ssh/ssh.cfg on line 1 in /usr/local/emhttp/plugins/ssh/ssh.php on line 2

 

 

What other plugins are you running?  Please list and also be sure to include all of the SF components you have installed.

 

 

 

Thanks

  • Author

Hi

I've installed this as way to get an ssh client to connect to my seedbox. The ultimate aim is to automate download of completed material through rsync and cron.

 

I've set up the public private key pair and they are saved in persistent storage. However I dont know how to prevent unraid asking for the seedbox to be re-entered into the known hosts file after an unraid reboot.

 

I understand that

UserKnownHostsFile /dev/null
StrictHostKeyChecking no
IdentityFile /mnt/user/eric/.ssh/id_rsa

will do what I want if entered into /etc/ssh/ssh_config.

 

But then I run into a second problem; how do I make ssh_config persistent? (I've added these lines to /boot/config/plugins/ssh/ssh_config but they are not being replicated into /etc/ssh_config).

 

Alternatively is there an easier way to do this from the command line. At the moment I am using

rsync -r [email protected]:/path/to/content/* /mnt/user/path/to/location/on/unraid/

which fails with rsync error number 255.

Thx

Eric

Eric,

 

Until reading your example, I've not had a reason to consider using copies of sshd_config and ssh_config stored in the plugin dir on flash.  Upon very first plugin install, I copy them over from /etc/ssh to plugin dir on flash but don't make use of them thereafter.  Until now I've only checked for the keys that are created during openssh package install and copy them over to flash so as to prevent SSH clients complaining about unrecognised server keys. 

 

I see what you're trying to do (I think).

 

I've pushed out a change to the plugin (v1.2) so that both those files are now copied from flash to /etc/ssh upon each enable/disable/start of the plugin.  You should now be able to make permanent changes to either and have SSH see those changes.

 

Not sure what to advise on the rsync command.  I use rysnc, but only locally from array disk to external USB HDD.  Have no experience of rsync over SSH I'm afraid.

 

 

Regards,

overbyrn

Thank you for the plugin, sshd is working for me. Just wanted to provide some feedback. My install reported some errors during the install.

 

# installplg openssh_overbyrn.plg

Deprecated: Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0

 

Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0

 

Everything else was successful.

 

In the SimpleFeatures v1.0.11 UI I also have this error:

 

Deprecated: Comments starting with '#' are deprecated in /boot/config/plugins/ssh/ssh.cfg on line 1 in /usr/local/emhttp/plugins/ssh/ssh.php on line 2

 

 

What other plugins are you running?  Please list and also be sure to include all of the SF components you have installed.

 

 

 

Thanks

 

I'm a little new to unraid so I may not know all the places plugins might be installed. I am running version=5.0-rc11. Here is everything I've installed.

 

openssh_overbyrn.plg

 

SimpleFeatures v1.0.11

simpleFeatures.email.notify-1.0.10-noarch-1.plg*

simpleFeatures.itunes.server-1.0.11-noarch-1.plg*

simpleFeatures.active.streams-1.0.10-noarch-1.plg* 

simpleFeatures.log.viewer-1.0.10-noarch-1.plg*

simpleFeatures.activity.monitor-1.0.11-noarch-1.plg* 

simpleFeatures.s3.sleep-1.0.10-noarch-1.plg*

simpleFeatures.cache.dirs-1.0.11-noarch-1.plg*       

simpleFeatures.system.info-1.0.10-noarch-1.plg*

simpleFeatures.core.webGUI-1.0.11-noarch-1.plg*     

simpleFeatures.system.stats-1.0.10-noarch-1.plg*

simpleFeatures.disk.health-1.0.11-noarch-1.plg*     

simpleFeatures.system.temp-1.0.11-noarch-1.plg*

simpleFeatures.disk.preclear-1.0.10-noarch-1.plg*   

simpleFeatures.web.server-1.0.11-noarch-1.plg*

simpleFeatures.dns.server-1.0.10-noarch-1.plg*

 

PlexMediaServer-0.9.7.22.511-4b5280f-unRAID.txz

 

07-unmenu-mymain.awk: 1.54 - changes for myMain 4-10-11 release, contributed by bjp999 - preclear support - Revision: 229

08-unmenu-array_mgmt.awk: 1.2.4 - fixed path to md.c to detect NOCORRECT mode - Revision: 241

09-unmenu-disk_mgmt.awk: 1.7 - fixed "mount" command to get file system type even if disk is apparently not spinning (where temp = "*" or "") - Revision: 232

10-unmenu-links.awk: 1.2 Fixed increment of link counter - Revision: 7 

15-unmenu-disk_perf.cgi: .1 - Proof of concept version Joe L. - Revision: 7 

15-unmenu-network_perf.cgi: .1 - Proof of concept version Joe L. - Revision: 190

16-unmenu-syslog.awk: Version: 1.0  - modified by bjp999, Use common routines to generate enhanced syslog viewer - Revision: 178

17-unmenu-syslog.awk: Version: .8  - modified by Joe L. to use a pattern file. - Revision: 7 

18-unmenu-lsof.awk: Version: .1  - Joe L. - Revision: 7 

20-unmenu-usage.awk: 1.0 - Revision: 7 

200-unmenu-smarthistory.cgi: 1.1 - added tests for directory, file, and php - Revision: 7 

25-unmenu-dupe_files.awk: 1.2 deal with appostraphe in file name - Revision: 7 

29-unmenu-sysinfo.awk: 1.4 - Added new buttons for free space, mounted file systems -  Joe L. - Revision: 7 

30-unmenu-file_browser.awk: 1.1.6 update allowd disk array to have members greater than disk15. - Revision: 234

40-unmenu-iso_share.awk: 1.2 Added formatting of "ls" date/time string to allow consistent parse of file path - Joe L.  - Revision: 236

50-unmenu-user_scripts.cgi: .4 - Added conditional tests to allow for dynamic button labels. - Revision: 171

600-unmenu-file_edit.awk: .2.1 Fixed error out of "ls" when directory does not exist.  Joe L. - Revision: 119

99-unmenu-myMain-Config.awk: 1.0 - Part of myMain 12-1-10 release, contributed by bjp999 - Revision: 246

99-unmenu-utility.awk: 1.54 - changes for myMain 4-10-11 release, contributed by bjp999 - smartctl support - Revision: 246

990-unmenu-wget.awk: 2.9  Fixed spelling error on "View All Available Packages" button.. - Revision: 246

999-unmenu-unraid_main.awk: 1.2 Joe L. -- Added code to detect presence of /etc/unraid-version and change main URL accordingly - Revision: 244

  • Author

# installplg openssh_overbyrn.plg

Deprecated: Directive 'register_long_arrays' is deprecated in PHP 5.3 and greater in Unknown on line 0

 

Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0

 

Everything else was successful.

 

In the SimpleFeatures v1.0.11 UI I also have this error:

 

Deprecated: Comments starting with '#' are deprecated in /boot/config/plugins/ssh/ssh.cfg on line 1 in /usr/local/emhttp/plugins/ssh/ssh.php on line 2

 

 

'register_long_arrays'

'magic_quotes_gpc'

 

These come from config values in your php.ini, which in turn will exist on your system due to having SF web server installed (maybe others too, I'm not sure).

 

FWIW, openssh plugin + SF web server 1.0.11 on vanilla rc12 does not give me the error in your screenshot.

 

I must assume that values in your php.ini file are causing the warnings.  Exactly why I do no know.  They're warnings so can be ignored, but I would like to understand the reason behind why you're seeing them.  I suggest you start with a clean plugin free system and gradually introduce others until you get the issue.

 

I think you can change the '#' at the start of the first line in ssh.cfg for a semi-colon, but the point is you shouldn't have to.  Or at least on my tests with other plugins I've not found a need to have to do this.  Definitely suggest you spend a bit of time investigating what other plugins on your system might be causing openssh plugin to issue these PHP warnings.  It would be a great help if you can do this as then perhaps I can understand if something needs to be changed to make all the plugins play well together.

 

 

Regards,

overbyrn

 

@overbyrn

Thank you, thats great.

Google tells me that the rsync error code occurs when ssh fails to connect so I am hoping that your update will solve my problems (it doesn't happen if I manually copy id_rsa and known hosts into ~/.ssh before running, but that seems unreliable when I include it in a script run from cron, I think the permissioning is difficult).

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.