SFTP command line

Advertisement

SCOMcat
Joined:
Posts:
1

SFTP command line

I'm trying to understand the syntax for connecting to SFTP through a proxy via the command line. In one environment where there is no proxy I'm connecting fine. I use a script that does an open and the password is sent in the string.

open sftp://UserName:UserPwd@SomeIP:port -hostkey="ssh-rsa 1024 SomeKey"

When trying it with the proxy, I open the session but I get access denied when I send the password. When I open this session via the GUI it works. The password is saved in the session.

! 2011-09-13 09:37:26.720 Using username "UserName".
. 2011-09-13 09:37:26.767 Prompt (7, SSH password, , &Password: )
. 2011-09-13 09:37:26.767 Using stored password.
. 2011-09-13 09:37:26.767 Sent password
! 2011-09-13 09:37:26.814 Access denied

my command is:
open Somefolder/UserName@SomeIP -hostkey="ssh-rsa 1024 SomeKey"

Is the correct password actually being sent? Not really familiar with the ins and outs of connecting in this fashion.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
Location:
Prague, Czechia

Re: SFTP command line

Turn on logging to file and compare logs from GUI and script to find the difference. If you do not, please post both.

Reply with quote

pavan129
Guest

Download file which is modified

Hi All,
I am trying to download a files which is modified recently.
Do we have option to download it automatically.
We cannot run the file which contains a group of command.
Last time u told we can use /script but thats not working.

My goal is run a file SFTP which contains group of command which will only download the files which has modified recently


Thanks
Pavan

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum