You are not logged in.

#1 2022-11-04 01:20:36

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

How can I have passwordless login to a user when using mosh?

I want to be able to just type "mosh <user>@<ip>" and login quick.

Offline

#2 2022-11-04 01:24:56

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: How can I have passwordless login to a user when using mosh?

You would have your key stored in a keychain:
https://wiki.archlinux.org/title/SSH_keys#Keychain


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2022-11-04 01:33:21

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

Re: How can I have passwordless login to a user when using mosh?

No, I mean make it so that anywhere in the world (that I can mosh into it) I type "mosh <user>@<ip>" and the server logs me in, no password, also the keychain program seems to be for ssh, not mosh.

Offline

#4 2022-11-04 04:17:32

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: How can I have passwordless login to a user when using mosh?

mosh takes ssh options, so there is no reason that it can't use credentials stored in a keychain.

What sort of authentication are you imagining would stop anyone else logging in to the server without a password...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2022-11-04 15:07:25

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

Re: How can I have passwordless login to a user when using mosh?

That's the point! If you are thinking the root user, I have that protected.

Offline

#6 2022-11-04 15:19:06

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

Re: How can I have passwordless login to a user when using mosh?

First, this is a bad idea.  Second, did I say this is a bad idea.

Given the above has been read and focusing on the direct question, "when using mosh" is irrelevant.  You need to configure the server to not require a password for that user to login.  The client that any-random-person uses to get access to your passwordless server is irrelevant.  This should be obvious: there is nothing that can be done in a client that would allow it to login without a password to a server that required one (whether using mosh, ssh, telnet, or any other conceivable client).

You can set the user on the server to have an empty password.  But before you do so, reread the first and second points above.  Then, if you want to be a good sport, start another thread under "Try this" where we can get a betting pool going to see who can guess how many seconds your server will stay online before it is compromised once you enact this setting.

Last edited by Trilby (2022-11-04 15:24:53)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2022-11-04 22:39:57

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

Re: How can I have passwordless login to a user when using mosh?

Ok then, thanks. Also, I know this is a bad idea, so I don't give the user shell access.

Offline

#8 2022-11-04 22:41:24

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: How can I have passwordless login to a user when using mosh?

AnonymouseCoder wrote:

Ok then, thanks. Also, I know this is a bad idea, so I don't give the user shell access.

You aren't in devops by any chance?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2022-11-04 22:52:30

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

Re: How can I have passwordless login to a user when using mosh?

No, what's that?

Offline

#10 2022-11-05 01:01:27

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,152

Re: How can I have passwordless login to a user when using mosh?

DevOps? Not sure if that's the intended reference, though.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#11 2022-11-05 06:48:31

seth
Member
Registered: 2012-09-03
Posts: 60,804

Re: How can I have passwordless login to a user when using mosh?

I know this is a bad idea, so I don't give the user shell access

829444.png

Online

#12 2022-11-05 16:17:48

ayekat
Member
Registered: 2011-01-17
Posts: 1,614

Re: How can I have passwordless login to a user when using mosh?

AnonymouseCoder wrote:

Ok then, thanks. Also, I know this is a bad idea, so I don't give the user shell access.

What access/permissions are you giving the user, though?
In post #3 you do write "the server logs me in", so… the user does get something after all.


pkgshackscfgblag

Offline

#13 2022-11-05 16:27:19

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

Re: How can I have passwordless login to a user when using mosh?

Just browsh, request stuff, terminate browsh in case of slow system, and info about stuff

Offline

#14 2022-11-05 16:29:17

seth
Member
Registered: 2012-09-03
Posts: 60,804

Online

#15 2022-11-05 17:12:42

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

Re: How can I have passwordless login to a user when using mosh?

Note that saying you "don't give the user shell access" is not really accurate if you've only set the default "shell" or login program to browsh.  Any random joe can login to your system with `ssh user@ip /bin/sh` and have access to an interactive shell session.  And if you think you are safe because it is not a root shell, I refer back to my suggestion of starting a betting pool for how long this server will last (and I've since greatly reduced the number of seconds I'd bet on).

While "enumerating badness" is a foolish approach to security, and similarly while an inability to list all the ways a non-root user could trash your system should not mean there aren't many, you may still want one: one does not need to be root or even have any skills whatsoever to run a fork bomb.

But even that aside, assuming they were really locked into just using browsh... ITS A WEB BROWSER!  If you think a JS-enabled browser running on your server is a nice safe cozy place to allow random strangers, you're really quite disconnected from reality.  And I don't say this to be mean (at least not as the intended goal) but potentially to save you from complete disaster... or at least save this community from trying to help you recover from that disaster.

Last edited by Trilby (2022-11-05 17:21:27)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#16 2022-11-05 17:28:10

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

Re: How can I have passwordless login to a user when using mosh?

Ok, very sorry for wasting your time. I'll lock down a bit by making a password for users, and I'll stop asking about this.

Offline

Board footer

Powered by FluxBB