Topic "SFTP command line"

Author Message
SCOMcat
[View user's profile]

Joined: 2011-09-13
Posts: 1
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.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Turn on logging to file and compare logs from GUI and script to find the difference. If you do not, please post both.
_________________
Martin Prikryl
pavan129

Guest


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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Please read FAQ:
http://winscp.net/eng/docs/faq_script_modified_files

If you have specific problem, please post details.
_________________
Martin Prikryl
psubhaschandra

Guest


prikryl wrote:
Please read FAQ:
http://winscp.net/eng/docs/faq_script_modified_files

If you have specific problem, please post details.




Can you please send me a scripts which will download the latest file i have tried lot of thisng its not working
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
psubhaschandra wrote:
Can you please send me a scripts which will download the latest file i have tried lot of thisng its not working

http://winscp.net/eng/docs/script_download_most_recent_file
_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License