Re: OpenSSH question : password prompt when scripting
- From: "Ryan H. Madison" <rmadison@xxxxxxxxxxx>
- Date: Wed, 14 Jun 2006 15:02:49 -0700
If I had to guess, I'd say that somehow the shell script is running as a
different user than the command line example.
Have you setup your public / private key exchange with a passphrase, or
without? Assuming you are user "pearson" in the first example, if that
session has an ssh-agent running and has set the:
SSH_AUTH_SOCK and SSH_AGENT_PID environment variables, those will not
carry over to the shell script. In that case, you would be prompted for
your passphrase instead of your password, so that may not be the
problem.
Questions:
Are you user pearson in the first example?
Does your shell script only contain the line: sftp
geles@xxxxxxxxxxxxxxxxxxxxxxx?
-----Original Message-----Of
From: IBM AIX Discussion List [mailto:aix-l@xxxxxxxxxxxxx] On Behalf
Yard, John
Sent: Wednesday, June 14, 2006 11:39 AM
To: aix-l@xxxxxxxxxxxxx
Subject: OpenSSH question : password prompt when scripting
On AIX 5.1 , using openssh, running as a user
I can do a key exchange, and will not be prompted
for a password :
$ sftp geles@xxxxxxxxxxxxxxxxxxxxxxx
Connecting to xxxasaprdftp.nc.ncs.com...
sftp> quit
$
But if I run the exact same command as a script,
it prompts me for a password:
[viper:/usr/local/bin] # su - pearson -c /usr/local/bin/get_Pearson
Connecting to xxxasaprdftp.nc.ncs.com...
gesles@xxxxxxxxxxxxxxxxxxxxxxx's password:
Has anyone seen this behavior in scripted sftp sessions ?
JYard
UCLA
- Prev by Date: Re: command to monitor fiber channel adapters?
- Next by Date: HACMP/ES 5.1 on AIX 5.3
- Previous by thread: Re: OpenSSH question : password prompt when scripting
- Next by thread: Looking for glvm filesets
- Index(es):
Relevant Pages
- Re: ssh via gateway to work host script
... I am writing a shell script to connect to my work computer. ... I get the following
prompt (of course with real values but just as a ... I generate a password and input it
at the command line. ... use autossh to open a reverse ssh tunnel from ...
(comp.unix.shell) - Re: Automating interactive sessions
... >I am trying to execute a certain command using a shell script. ...
>the prompt? ... (comp.unix.shell) - Automating interactive sessions
... I am trying to execute a certain command using a shell script. ... for
accepting the password on the command line. ... or perhaps trapping the prompt in
the shell somehow and ... (comp.unix.shell) - Re: extract of an image (array)
... ImageMagick can do this with an easy one line command at the command ... Image
Magick is often installed by default on Linux machines, ... I think you just need to type
the following command at the prompt to ... shell script to perform this command
on them all. ... (comp.lang.fortran) - How to disable interactive prompt and autologon inside a shell script
... I am trying to run a ftp function inside a shell script. ... matter
what I do, the -i and -n cannot be recognized by the ftp ... it still prompt for password.
... (comp.sys.hp.hpux)