How to remove "user@host's password" from ssh login prompt?

classic Classic list List threaded Threaded
30 messages Options
12
Reply | Threaded
Open this post in threaded view
|

How to remove "user@host's password" from ssh login prompt?

Chris Green
How can one remove the username and hostname that precede "password"
when logging in using ssh?

I.e. when I connect to a host called abcdef I want to see just:-

    Password:

rather than:-

    chris@abcdef's password:


--
Chris Green

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to remove "user@host's password" from ssh login prompt?

Karl Auer
On Sun, 2018-09-02 at 15:32 +0100, Chris Green wrote:
> How can one remove the username and hostname that precede "password"
> when logging in using ssh?

That prompt is presented by your local system, not by the remote
system. It is knowledge that your local system has - the name you are
trying to connect as, and the system you are trying to connect to.

I would characterise it as harmless.

That said, why do you want to remove it?

Regards, K.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer ([hidden email])
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: A0CD 28F0 10BE FC21 C57C 67C1 19A6 83A4 9B0B 1D75
Old fingerprint: A52E F6B9 708B 51C4 85E6 1634 0571 ADF9 3C1C 6A3A



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to remove "user@host's password" from ssh login prompt?

ubuntu-users mailing list
On Mon, 03 Sep 2018 01:12:08 +1000, Karl Auer wrote:
> On Sun, 2018-09-02 at 15:32 +0100, Chris Green wrote:
>
>> How can one remove the username and hostname that precede "password"
>> when logging in using ssh?

One way might be to include the password in the ssh command:

          $ ssh username:[hidden email]

That-a-way it's all done in one go.

> That prompt is presented by your local system, not by the remote
> system. It is knowledge that your local system has - the name you are
> trying to connect as, and the system you are trying to connect to.
>
> I would characterise it as harmless.
> That said, why do you want to remove it?

Well, I always experience the "puccker factor" when I need to ssh into
my vps from a 'public' machine, or while in an airport, or the somesuch.

Of course, we would be remiss not to recommend ssh public/private key
authentication.  Except that would be even worse in the case of a _public_
machine.....
More:
        https://www.ssh.com/ssh/public-key-authentication

Jonesy


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to remove "user@host's password" from ssh login prompt?

Eero Volotinen-2
That is really insecure way on multiuser system
Just modify client sourcecode, if that is really needed.

Eero

su 2. syysk. 2018 klo 18.37 Jonesy via ubuntu-users <[hidden email]> kirjoitti:
On Mon, 03 Sep 2018 01:12:08 +1000, Karl Auer wrote:
> On Sun, 2018-09-02 at 15:32 +0100, Chris Green wrote:
>
>> How can one remove the username and hostname that precede "password"
>> when logging in using ssh?

One way might be to include the password in the ssh command:

          $ ssh [hidden email]

That-a-way it's all done in one go.

> That prompt is presented by your local system, not by the remote
> system. It is knowledge that your local system has - the name you are
> trying to connect as, and the system you are trying to connect to.
>
> I would characterise it as harmless.
> That said, why do you want to remove it?

Well, I always experience the "puccker factor" when I need to ssh into
my vps from a 'public' machine, or while in an airport, or the somesuch.

Of course, we would be remiss not to recommend ssh public/private key
authentication.  Except that would be even worse in the case of a _public_
machine.....
More:
        https://www.ssh.com/ssh/public-key-authentication

Jonesy


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to remove "user@host's password" from ssh login prompt?

Colin Watson
In reply to this post by Chris Green
On Sun, Sep 02, 2018 at 03:32:03PM +0100, Chris Green wrote:

> How can one remove the username and hostname that precede "password"
> when logging in using ssh?
>
> I.e. when I connect to a host called abcdef I want to see just:-
>
>     Password:
>
> rather than:-
>
>     chris@abcdef's password:

This isn't customisable.  Changing it would require rebuilding openssh
(the userauth_passwd function in sshconnect2.c).

--
Colin Watson                                       [[hidden email]]

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to remove "user@host's password" from ssh login prompt?

Chris Green
In reply to this post by Karl Auer
On Mon, Sep 03, 2018 at 01:12:08AM +1000, Karl Auer wrote:
> On Sun, 2018-09-02 at 15:32 +0100, Chris Green wrote:
> > How can one remove the username and hostname that precede "password"
> > when logging in using ssh?
>
> That prompt is presented by your local system, not by the remote
> system. It is knowledge that your local system has - the name you are
> trying to connect as, and the system you are trying to connect to.
>
Yes, I realise that, though it's unclear whether it's the ssh daemon
that does it or something else (login executable?).


> I would characterise it as harmless.
>
> That said, why do you want to remove it?
>
Yes, it's not a *big* issue but I'd really prefer not to give someone
who happens to get a prompt the name of the system and the user.  One
system I use just presents "Password:" and I'd like to do the same.

--
Chris Green

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to remove "user@host's password" from ssh login prompt?

Eero Volotinen-2
As I said. Prompt comes from ssh-client (on local machine).

Eero

On Tue, Sep 4, 2018 at 12:24 PM Chris Green <[hidden email]> wrote:
On Mon, Sep 03, 2018 at 01:12:08AM +1000, Karl Auer wrote:
> On Sun, 2018-09-02 at 15:32 +0100, Chris Green wrote:
> > How can one remove the username and hostname that precede "password"
> > when logging in using ssh?
>
> That prompt is presented by your local system, not by the remote
> system. It is knowledge that your local system has - the name you are
> trying to connect as, and the system you are trying to connect to.
>
Yes, I realise that, though it's unclear whether it's the ssh daemon
that does it or something else (login executable?).


> I would characterise it as harmless.
>
> That said, why do you want to remove it?
>
Yes, it's not a *big* issue but I'd really prefer not to give someone
who happens to get a prompt the name of the system and the user.  One
system I use just presents "Password:" and I'd like to do the same.

--
Chris Green

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to remove "user@host's password" from ssh login prompt?

Colin Watson
In reply to this post by Chris Green
On Tue, Sep 04, 2018 at 10:19:56AM +0100, Chris Green wrote:
> Yes, I realise that, though it's unclear whether it's the ssh daemon
> that does it or something else (login executable?).

I gave the precise source code reference in an earlier message.

> Yes, it's not a *big* issue but I'd really prefer not to give someone
> who happens to get a prompt the name of the system and the user.  One
> system I use just presents "Password:" and I'd like to do the same.

I could understand this if it were something presented by the server,
but it's not - the prompt is presented by the client.  It sounds like
you're thinking that this is information leaked by the server, but it
isn't.

--
Colin Watson                                       [[hidden email]]

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to remove "user@host's password" from ssh login prompt?

Chris Green
On Tue, Sep 04, 2018 at 10:39:26AM +0100, Colin Watson wrote:

> On Tue, Sep 04, 2018 at 10:19:56AM +0100, Chris Green wrote:
> > Yes, I realise that, though it's unclear whether it's the ssh daemon
> > that does it or something else (login executable?).
>
> I gave the precise source code reference in an earlier message.
>
> > Yes, it's not a *big* issue but I'd really prefer not to give someone
> > who happens to get a prompt the name of the system and the user.  One
> > system I use just presents "Password:" and I'd like to do the same.
>
> I could understand this if it were something presented by the server,
> but it's not - the prompt is presented by the client.  It sounds like
> you're thinking that this is information leaked by the server, but it
> isn't.
>
I don't really care where it comes from and what you say doesn't
actually make sense to me.

One system that I ssh into doesn't present either my name or the
system's host name, other systems *do* give my name and the host name.
These are all Linux systems and I'm logging in from the same client to
all of them.  So - how does one manage not to present user name and
host name while all the others do?

--
Chris Green

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to remove "user@host's password" from ssh login prompt?

Colin Law
On Tue, 4 Sep 2018 at 11:13, Chris Green <[hidden email]> wrote:
> ..
> One system that I ssh into doesn't present either my name or the
> system's host name, other systems *do* give my name and the host name.
> These are all Linux systems and I'm logging in from the same client to
> all of them.  So - how does one manage not to present user name and
> host name while all the others do?

Are you talking about the password request or the prompt after you
have logged in?

Colin

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to remove "user@host's password" from ssh login prompt?

Colin Watson
In reply to this post by Chris Green
On Tue, Sep 04, 2018 at 11:11:10AM +0100, Chris Green wrote:

> On Tue, Sep 04, 2018 at 10:39:26AM +0100, Colin Watson wrote:
> > On Tue, Sep 04, 2018 at 10:19:56AM +0100, Chris Green wrote:
> > > Yes, it's not a *big* issue but I'd really prefer not to give someone
> > > who happens to get a prompt the name of the system and the user.  One
> > > system I use just presents "Password:" and I'd like to do the same.
> >
> > I could understand this if it were something presented by the server,
> > but it's not - the prompt is presented by the client.  It sounds like
> > you're thinking that this is information leaked by the server, but it
> > isn't.
>
> I don't really care where it comes from and what you say doesn't
> actually make sense to me.

Well, it matters in a non-pedantic way because if it's from the server
then it's an information leak, while if it's from the client then it
isn't.

> One system that I ssh into doesn't present either my name or the
> system's host name, other systems *do* give my name and the host name.
> These are all Linux systems and I'm logging in from the same client to
> all of them.  So - how does one manage not to present user name and
> host name while all the others do?

That sounds like one of those is going through some other authentication
method while the others are going through password authentication.
Without seeing at least a transcript of connecting to the first system,
it's hard to tell.

Ideally, I'd recommend just setting up public-key authentication to
everything you use at all regularly.  Password authentication sometimes
makes sense as a fallback or before you've set up anything better, but
public-key authentication is easier to use once you've set it up (since
you won't be prompted at all) and generally safer if you trust your
client.

--
Colin Watson                                       [[hidden email]]

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to remove "user@host's password" from ssh login prompt?

Peter Flynn
In reply to this post by Colin Law
Surely this refers to the system prompt after login, so it's controlled by
the .bashrc file.

It's only a security leak if someone is looking over your shoulder: an ssh
connection is encrypted. If that connection or the source host has been
compromised, you'd have an entirely separate problem.

P

On 4 September 2018 11:31:26 Colin Law <[hidden email]> wrote:

> On Tue, 4 Sep 2018 at 11:13, Chris Green <[hidden email]> wrote:
>> ..
>> One system that I ssh into doesn't present either my name or the
>> system's host name, other systems *do* give my name and the host name.
>> These are all Linux systems and I'm logging in from the same client to
>> all of them.  So - how does one manage not to present user name and
>> host name while all the others do?
>
> Are you talking about the password request or the prompt after you
> have logged in?
>
> Colin
>
> --
> ubuntu-users mailing list
> [hidden email]
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users




--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to remove "user@host's password" from ssh login prompt?

Karl Auer
On Tue, 2018-09-04 at 13:03 +0100, Peter Flynn wrote:
> Surely this refers to the system prompt after login, so it's
> controlled by the .bashrc file.

No! It's been said a dozen times now: The prompt Chris is talking about
is issued by his client software. The ssh client.

Regards, K.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer ([hidden email])
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: A0CD 28F0 10BE FC21 C57C 67C1 19A6 83A4 9B0B 1D75
Old fingerprint: A52E F6B9 708B 51C4 85E6 1634 0571 ADF9 3C1C 6A3A



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to remove "user@host's password" from ssh login prompt?

Karl Auer
In reply to this post by Colin Watson
On Tue, 2018-09-04 at 12:28 +0100, Colin Watson wrote:
> Ideally, I'd recommend just setting up public-key authentication to
> everything you use at all regularly.

Yes.

> public-key authentication is easier to use once you've set it up
> (since you won't be prompted at all) and generally safer if you trust
> your client.

Depends what you mean by "trust your client". If you do not use a
passphrase on your ssh keys, then anyone with your computer can log in
wherever those keys permit, without further ado. Or, if they steal or
otherwise obtain your private keys, they can do so from any computer.

Unless being used in automation (and then wrapped in other security
mechanisms), ssh keys should always have good solid passphrases.

And before some pimply security wonk tells me that passphrases aren't
secure - yes, they are, if you choose a nice long one. They are not AS
secure as the keys themselves, but they are a damn sight better than
nothing. ssh-agent will help you not have to enter it too often.

Regards, K.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer ([hidden email])
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: A0CD 28F0 10BE FC21 C57C 67C1 19A6 83A4 9B0B 1D75
Old fingerprint: A52E F6B9 708B 51C4 85E6 1634 0571 ADF9 3C1C 6A3A



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to remove "user@host's password" from ssh login prompt?

Karl Auer
In reply to this post by Chris Green
On Tue, 2018-09-04 at 10:19 +0100, Chris Green wrote:
> One system I use just presents "Password:" and I'd like to do the
> same.

If you are the same user, using the same ssh client on the same
computer to contact that system as you are using to contact other
systems where you get a "name@system" password, then I am mightily
puzzled.

Regards, K.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer ([hidden email])
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: A0CD 28F0 10BE FC21 C57C 67C1 19A6 83A4 9B0B 1D75
Old fingerprint: A52E F6B9 708B 51C4 85E6 1634 0571 ADF9 3C1C 6A3A



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to remove "user@host's password" from ssh login prompt?

Colin Law
In reply to this post by Karl Auer
On Tue, 4 Sep 2018 at 13:29, Karl Auer <[hidden email]> wrote:
>
> On Tue, 2018-09-04 at 13:03 +0100, Peter Flynn wrote:
> > Surely this refers to the system prompt after login, so it's
> > controlled by the .bashrc file.
>
> No! It's been said a dozen times now: The prompt Chris is talking about
> is issued by his client software. The ssh client.

That is correct, however we are just double checking with Chris
following the information that some connections show it and some
don't, which is a behaviour that is not easy to explain.  So far that
clarification has not been forthcoming, but it may be the middle of
the night for him of course.

Colin

>
> Regards, K.
>
> --
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Karl Auer ([hidden email])
> http://www.biplane.com.au/kauer
> http://twitter.com/kauer389
>
> GPG fingerprint: A0CD 28F0 10BE FC21 C57C 67C1 19A6 83A4 9B0B 1D75
> Old fingerprint: A52E F6B9 708B 51C4 85E6 1634 0571 ADF9 3C1C 6A3A
>
>
>
> --
> ubuntu-users mailing list
> [hidden email]
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to remove "user@host's password" from ssh login prompt?

Chris Green
In reply to this post by Colin Law
On Tue, Sep 04, 2018 at 11:30:00AM +0100, Colin Law wrote:

> On Tue, 4 Sep 2018 at 11:13, Chris Green <[hidden email]> wrote:
> > ..
> > One system that I ssh into doesn't present either my name or the
> > system's host name, other systems *do* give my name and the host name.
> > These are all Linux systems and I'm logging in from the same client to
> > all of them.  So - how does one manage not to present user name and
> > host name while all the others do?
>
> Are you talking about the password request or the prompt after you
> have logged in?
>
The password request.  The system I'd like to emulate simply says
"Password:" and nothing else before and nothing after unitl the bash
prompt appears.

So:-

    chris$ ssh <the host in question>
    Password:
    <prompt>$



--
Chris Green

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to remove "user@host's password" from ssh login prompt?

Chris Green
In reply to this post by Peter Flynn
On Tue, Sep 04, 2018 at 01:03:26PM +0100, Peter Flynn wrote:
> Surely this refers to the system prompt after login, so it's controlled by
> the .bashrc file.
>
No (OP here) I'm talking about the password prompt.  It's easy to
change the bash prompt to whatever you fancy by setting PS1.


> It's only a security leak if someone is looking over your shoulder: an ssh
> connection is encrypted. If that connection or the source host has been
> compromised, you'd have an entirely separate problem.
>
It's a bit of a leak if someone just types "ssh <somewhere>" and gets
confirmation that <somewhere> exists and my login name on <somewhere>.

--
Chris Green

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to remove "user@host's password" from ssh login prompt?

Chris Green
In reply to this post by Karl Auer
On Tue, Sep 04, 2018 at 10:27:41PM +1000, Karl Auer wrote:
> On Tue, 2018-09-04 at 13:03 +0100, Peter Flynn wrote:
> > Surely this refers to the system prompt after login, so it's
> > controlled by the .bashrc file.
>
> No! It's been said a dozen times now: The prompt Chris is talking about
> is issued by his client software. The ssh client.
>
So how come it's different on one particular host I connect to?

--
Chris Green

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

Re: How to remove "user@host's password" from ssh login prompt?

Chris Green
In reply to this post by Colin Law
On Tue, Sep 04, 2018 at 02:52:58PM +0100, Colin Law wrote:

> On Tue, 4 Sep 2018 at 13:29, Karl Auer <[hidden email]> wrote:
> >
> > On Tue, 2018-09-04 at 13:03 +0100, Peter Flynn wrote:
> > > Surely this refers to the system prompt after login, so it's
> > > controlled by the .bashrc file.
> >
> > No! It's been said a dozen times now: The prompt Chris is talking about
> > is issued by his client software. The ssh client.
>
> That is correct, however we are just double checking with Chris
> following the information that some connections show it and some
> don't, which is a behaviour that is not easy to explain.  So far that
> clarification has not been forthcoming, but it may be the middle of
> the night for him of course.
>
Exactly!  :-)

It *is* the password prompt and it *is* different on one systme I
connect to (plus I'd like to make all the systems I connect to work
like that system).

--
Chris Green

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
12