On Mon, 5 Aug 2024 21:55:45 +0000 "Pew, Curtis G"
<[email protected]> wrote:

:>On Aug 5, 2024, at 4:42?PM, Pew, Curtis G <[email protected]> 
wrote:

:>That sftp doesn’t support anything like NETRC?

:>The sftp protocol is a part of ssh, and ssh supports public/private key 
authentication, so you can avoid the use of passwords.

:>I guess I should add: if you want to have something shorter than 
[email protected]<mailto:[email protected]> you can define a “Host” in 
your ssh configuration file, ~/.ssh/config. Like:

:>Host myalias
:>   User userid
:>   HostName full.dns.name

:>Then you can type `sftp myalias` instead of `sftp 
[email protected]<mailto:[email protected]>`.

Thanks. I found a way to force the password in the script.

1. Create a script file that contains

echo $PASSWORD

2. Export PASSWORD

3. Specify 

export SSH_ASKPASS=the script above

Then run SFTP

--
Binyamin Dissen <[email protected]>
http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to