Re: How can I tell openssh client to prompt for a username
From: Martin Harte (martin.harte_at_redbrick.dcu.ie)
Date: 07/08/04
- Previous message: Lauri Bettencourt: "openssh-3.8.1p1 & Solaris 8 Installation Issue"
- Maybe in reply to: Martin Harte: "How can I tell openssh client to prompt for a username"
- Next in thread: Jan-Benedict Glaw: "Re: How can I tell openssh client to prompt for a username"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 8 Jul 2004 18:52:49 +0100 To: Greg Wooledge <wooledg@eeg.ccf.org>
On Thu, Jul 08, 2004 at 12:39:39PM -0400, Greg Wooledge wrote:
> On Thu, Jul 08, 2004 at 01:59:20PM +0100, Martin Harte wrote:
> > Just wondering if there is an option to get Openssh 3.7.1p2 client
> > to prompt for a username.
> > It doesn't suit to pass one on the command line in my situation.
>
> Write a small shell script wrapper around it. For example (untested!):
>
> #!/bin/bash
>
> # Assume that the last parameter is a hostname...
> if [ -t 0 -a -t 1 ]; then
> echo -n "Enter the username at ${!#}: "
> read username
> else
> username=$USER
> fi
>
> exec the-real-ssh -l $username "$@"
>
Thanks, that's actually the solution we've implemented at the moment.
The problem is that we have to display a banner on the site so users
get this:
Username: jbloggs
------------------------------
Welcome to blah blah
------------------------------
Password:
Which just looks a little funny. I thought there might be an option somewhere
to get the client to prompt.
Martin.
- Previous message: Lauri Bettencourt: "openssh-3.8.1p1 & Solaris 8 Installation Issue"
- Maybe in reply to: Martin Harte: "How can I tell openssh client to prompt for a username"
- Next in thread: Jan-Benedict Glaw: "Re: How can I tell openssh client to prompt for a username"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|