Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re: User name prompt with ssh |
|---|---|
| Date: | Fri, 2 Sep 2005 14:00:58 -0400 |
On Fri, Sep 02, 2005 at 10:54:20AM +0200, Johan De Meersman wrote:
---begin prompt-ssh.sh--- #!/bin/bash read -p "Please enter your remote username: " SSH_LOGIN real-ssh -l "$SSH_LOGIN" $* ---end prompt-ssh.sh---
You'll want "$@" (with the quotes) on the end of the last line, not $*. Or
if you use #!/bin/sh instead of bash, you'll want ${1+"$@"} for historical
reasons.
Otherwise, you'll get the wrong results when users pass quoted strings with
spaces in them as arguments to ssh.
"$@" is equivalent to "$1" "$2" "$3"... for however many arguments there are.
"$*" is equivalent to "$1 $2 $3..."
$* or $@ (unquoted) is equivalent to $1 $2 $3...
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | RE: Multiple authorized_keys2 files or how to achieve same effect., Jayson Anderson |
|---|---|
| Next by Date: | help? ssh connect w/ DSA pubkey auth keeps asking for passphrase; w/ RSA pubkey auth, all is OK, OpenMacNews |
| Previous by Thread: | Re: User name prompt with ssh, Johan De Meersman |
| Next by Thread: | RE: User name prompt with ssh, Mark Senior |
| Indexes: | [Date] [Thread] [Top] [All Lists] |