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

  • Next message: David Roman Esteban: "Re: 64_bit SSH"
    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.


  • Next message: David Roman Esteban: "Re: 64_bit SSH"

    Relevant Pages

    • RE: user name prompt after office 2003 install
      ... it will prompt for the username. ... > I am installing Office 2003 using a custom .mst file created with the CIW, ... > 2003 to prompt the user to enter a username and initials as we use document ...
      (microsoft.public.office.setup)
    • Re: Password access for folders over network
      ... the network logon always uses the currently logged on user ... but you *can* get it to prompt for the password. ... username, ...
      (microsoft.public.windowsxp.security_admin)
    • Re: "Run As," Adding Names to Drop-Down Box
      ... username you specified to start the program. ... prompt to enter my password. ... Second one, I see a window flash, then nothing. ... On the second one, the script, make sure you have the quotations ...
      (microsoft.public.windowsxp.help_and_support)
    • Re: CredientialCache.DefaultCredentials Problem
      ... set to Prompt for Username and Password, when I set it to Automatically ... I would suggest using the SharePoint Object Model. ... So why isn't the CredentialCache method working? ...
      (microsoft.public.sharepoint.windowsservices)
    • Re: i want to add a promt to a batch command.
      ... When you want to add a prompt to a BATCH file you would use the set ... so if you wanted to name your variable "Username" you would have ... set is the command ...
      (microsoft.public.windows.server.scripting)