bjornruffians
bjornruffians

Reputation: 701

Dropbear - cannot SSH when user's shell is redirected

I am running Linux on an embedded system with Buildroot+Dropbear. I am using systemd for init, if that matters.

Logging in via SSH works properly for root, but not as a regular user (gives "Permission denied, please try again."). The user's shell is redirected to a custom program with this entry in /etc/passwd:

admin:x:1000:1000:Custom user:/home/admin:/opt/customCLI

Logging in as the admin user works fine when the shell is /bin/sh. /opt/customCLI is a program I wrote that accepts a minimal set of commands.

Is there a way to support SSH logins directly to a custom program?

Upvotes: 3

Views: 2414

Answers (1)

that other guy
that other guy

Reputation: 123570

Add your program to /etc/shells

Some login tools will reject logins to users with unknown shells. This prevents the back door of using SSH to modify files or forward ports while being locked out with /usr/sbin/nologin or /bin/false.

Upvotes: 6

Related Questions