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 closes connection on non-root users

Featured Replies

Been running unRAID 5.0-rc16c for a few months now and going back to fix little quirks here and there.

 

One of them was the root password.  The GUI was not setting it.  So, I did it manually and then later realized I needed to copy /etc/passwd and /etc/shadow to /boot/config to save and restore those files.  OK, that's solved.

 

I tried configuring my personal login by setting the password and recopying the files.  I then tried to login via ssh or telnet and I soon as I login, the system immediately closes the connection.  I get the feeling there is some security measure in place that does not like my local login.  I can still login via ssh or telnet as root (after I modified sshd_config to PermitRootLogin).

 

I could dig around more, but I feel like I'm fighting the system here and don't want to get too far away from the stock config.  At the same time, it seems like a lot of standards were sort of missed here in running a system like this.

Your post title says OpenSSH closes connection, but then later on you say as soon as you login via ssh or telnet the system closes connection.  You're not using OpenSSH for telnet.

 

What method have you used to install OpenSSH?

 

If root works ok but a non-root user does not, then I'd guess that user does not have a shell defined.  Did you create the user from within the UnRAID "users" part of the webGui?  If so, then UnRAID does not assign a shell to the user by standard, so this is probably why.  You can check by doing something like this from command line;

 

cat /etc/passwd

ycam:x:1000:100:ycam:/:/bin/false

fred:x:1003:100:fred:/home/fred:/bin/bash

 

The example above, I have a user called "ycam" which was created from inside UnRAID, which has no shell defined, whereas user "fred" has a shell (and home directory).

 

To be fair, you moved away from "stock" the moment you started using OpenSSH.  The main thing to remember is that with telnet or SSH, you need to define a user with a valid home directory and shell to be able to login as that user.  Stock UnRAID is designed to allow for creation of users from inside the webgui but only for use in accessing shares.  Never for directly logging in.

 

 

Regards,

overbyrn

 

 

  • Author

Yep, I know the difference between telnet and ssh.  As I was typing it out I was analyzing this further more unfolded and ended up muddling two issues together when what I was trying to sort out was how to get non-root login access.

 

I did not look at the passwd file as it likely has /bin/false for the account and guessing that's the default.  I also realized later on there was no home directory either.  Part of me is fighting to have some standards for managing this UNIX type host and I need to remind myself this is an atypical UNIX type system.  I assumed I would want the OpenSSH for using RSA authentication and other such methods.

 

After thinking about it for awhile now, I'm realizing it's not worth the effort with these customizations.  I need to settle on telnet as root for now and wait to see if I need more advanced access.  Definitely not worried about someone sniffing out my telnet connection either on my own network (and no remote access is allowed anyway).

 

Sorry for the confusion there.  I need to dig deeper sometimes before asking questions, but it's also how I solve problems.  :P

No problem, glad you figured out what was needed. 

 

If you're running version 5.x of UnRAID and able to take advantage of the plugins and you do decide you want SSH, then pardon the shameless plug, but try my OpenSSH plugin.  You can select multiple users and elect to have only access with private / public keys if that's your wish. 

 

As you say though, for now just work out what level of access you require.

 

 

Regards,

overbyrn

 

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.