Re: How can I tell openssh client to prompt for a username
From: Greg Wooledge (wooledg_at_eeg.ccf.org)
Date: 07/08/04
- Previous message: Lucio Crusca: "Re: Disable SFTP/SCP but not SSH?"
- In reply to: Martin Harte: "How can I tell openssh client to prompt for a username"
- Next in thread: Martin Harte: "Re: How can I tell openssh client to prompt for a username"
- Reply: Martin Harte: "Re: How can I tell openssh client to prompt for a username"
- Reply: 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 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 "$@"
- Previous message: Lucio Crusca: "Re: Disable SFTP/SCP but not SSH?"
- In reply to: Martin Harte: "How can I tell openssh client to prompt for a username"
- Next in thread: Martin Harte: "Re: How can I tell openssh client to prompt for a username"
- Reply: Martin Harte: "Re: How can I tell openssh client to prompt for a username"
- Reply: 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
|