Discussion:
CommandLine and SFTP command
(too old to reply)
active1SM@yahoo.com
2020-05-04 17:41:02 UTC
Permalink
Hey,
Trying to use the examples/commandLine_connector and inserted something like:

"sftp -P 8022 ***@mysftpsite.com"
expecting to get a returned value of :
Password Authentication
Enter password for myUser
Password:

So the while loop never does anything and things hang. Selected 'Use sh' and tried quotes etc. Any hints?
Thanks
Eddie Hartman
2020-05-07 10:13:23 UTC
Permalink
Post by ***@yahoo.com
Hey,
Password Authentication
Enter password for myUser
So the while loop never does anything and things hang. Selected 'Use sh' and tried quotes etc. Any hints?
Thanks
How exactly are you using the CommandLine Connector, and have you explored the system.shellCommand() function. I usually use this instead as it's easier to debug. Plus you have simpler control of how arguments are passed.

/Eddie
j***@gmail.com
2020-05-11 07:53:30 UTC
Permalink
The command line connector does not allow you to give input to the running program. But take a look at 'man sftp', it will give you hints for how to use sftp in non-interactive mode.
Eddie Hartman
2020-05-12 06:17:53 UTC
Permalink
In order to call sftp without getting the password prompt use with shpass, our set up rsa keys instead.
Loading...