You are not logged in.

#1 2022-09-18 21:45:00

AnonymouseCoder
Member
Registered: 2022-09-18
Posts: 14

How do I ssh into a user with no shell?

I've been trying to ssh into a user that launches a program on login instead of a shell, but I can't. It could be an issue of passwords, but I've been trying that with nothing happening, and I now think it is the ssh that's the problem, anyone help? (Maybe I just setup the server wrong, I'll see if it's that in the meantime.)

Offline

#2 2022-09-18 21:51:04

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: How do I ssh into a user with no shell?

What do you mean you "cant".  I suspect you can and you do, but if there is no shell the currently-unspecified program runs and ssh exits.

Why do you have the user configured to launch the program on login instead of a shell and how is this configured?  And what program is it?

Note that you can specify a program to run in your ssh command other than the default login shell for the user.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2022-09-18 22:58:50

AnonymouseCoder
Member
Registered: 2022-09-18
Posts: 14

Re: How do I ssh into a user with no shell?

Trilby wrote:

if there is no shell the currently-unspecified program runs and ssh exits.

The "Unspecified Program" is browsh, so it should stay running.

Trilby wrote:

Why do you have the user configured to launch the program on login instead of a shel

So I can (stupid, i know) access browsh from my phone, as the ssh demo is:
1) a demo, I only get 15 minutes
2) currently down, so I just run a server so I can run browsh.

Trilby wrote:

how is this configured?

usermod -s /bin/browsh
(when I made the user it was in bash so i could setup browsh (yes, i could have done it with root))

Offline

#4 2022-09-19 00:32:35

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,442
Website

Re: How do I ssh into a user with no shell?

So just specify an actual shell (e.g., bash) in your ssh command.  Just be sure to also include the -t flag, e.g.:

ssh -t <user>@<hostname> bash

Then check the logs to see why browsh is failing.  I suspect it's due to an incompatibility with the terminal (TERM value) specified by the phone.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2022-11-05 16:42:11

AnonymouseCoder
Member
Registered: 2022-09-18
Posts: 14

Re: How do I ssh into a user with no shell?

I discovered that the problem was not this, sorry!

Offline

Board footer

Powered by FluxBB