Re: How can I tell openssh client to prompt for a username

From: Greg Wooledge (wooledg_at_eeg.ccf.org)
Date: 07/08/04

  • Next message: Jack ~: "Re: How can I tell openssh client to prompt for a username"
    Date: Thu, 8 Jul 2004 12:39:39 -0400
    To: Martin Harte <martin.harte@redbrick.dcu.ie>
    
    

    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 "$@"


  • Next message: Jack ~: "Re: How can I tell openssh client to prompt for a username"

    Relevant Pages

    • Re: Automated teller machine help please
      ... machine talking with its bank server. ... like if anything except the UserName was given even a right pass. ... I suggest you write a separate small programs whose job is to prompt the user for those things in the order you want them. ... I'd avoid them by having the client encode the keywords as a data type that can be used in a switch statement. ...
      (comp.lang.java.help)
    • Re: How can I tell openssh client to prompt for a username
      ... > to prompt for a username. ... > It doesn't suit to pass one on the command line in my situation. ...
      (SSH)
    • Re: Password problem
      ... I have a client PC trying ... > connecting with a ADSL connection. ... > We use a username and password to gain access to the Intranet. ... > it still doesn't even prompt for a password. ...
      (microsoft.public.windows.inetexplorer.ie6.browser)
    • How can I tell openssh client to prompt for a username
      ... to prompt for a username. ... It doesn't suit to pass one on the command line in my situation. ...
      (SSH)
    • Re: using Windows authentication within intranet
      ... Ethan Shayne wrote: ... > instance in my client application with a username and password. ... > prompt the user for their password again in the client application. ...
      (microsoft.public.dotnet.framework.aspnet.webservices)