Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's a decent SFTP command-line client for windows? [closed]

Most of the windows SFTP clients (like FileZilla) seem to be GUI-based. I need something I can call from batch files.

like image 473
Eggplant Jeff Avatar asked Aug 13 '10 13:08

Eggplant Jeff


People also ask

Does Windows have a built-in SFTP client?

Windows doesn't have a built-in SFTP client. So if you're looking to transfer files with an SFTP server but are using a Windows machine, you might want to check out this post.

How do I run SFTP from command prompt?

How to Connect to SFTP. By default, the same SSH protocol is used to authenticate and establish an SFTP connection. To start an SFTP session, enter the username and remote hostname or IP address at the command prompt. Once authentication is successful, you will see a shell with an sftp> prompt.

Does Windows 10 come with SFTP client?

SFTP is supported on the command-line only via the Win32-OpenSSH sftp.exe , which is built-in on Windows 10 version 1803 or newer.

What is the SFTP command in Windows?

The SSH File Transfer Protocol allows you to transfer files from the command line via SSH between a local computer and a specified remote computer. Like SSH, SFTP can be run natively from the shell.


4 Answers

pscp and psftp are very customizable(options) and light weight. Open source to boot.

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

like image 141
Chris Avatar answered Oct 19 '22 20:10

Chris


WinSCP has the command line functionality:

c:\>winscp.exe /console /script=example.txt

where scripting is done in example.txt.

See http://winscp.net/eng/docs/guide_automation

Refer to http://winscp.net/eng/docs/guide_automation_advanced for details on how to use a scripting language such as Windows command interpreter/php/perl.

FileZilla does have a command line but it is limited to only opening the GUI with a pre-defined server that is in the Site Manager.

like image 27
Nasri Najib Avatar answered Oct 19 '22 20:10

Nasri Najib


Cygwin + sftp/scp natrually

like image 6
MooGoo Avatar answered Oct 19 '22 21:10

MooGoo


WinSCP can be called from batch file:

"C:\Program Files\WinSCP\WinSCP.exe" /console

Example commands:

option batch on 
option confirm off  
option transfer binary 
open sftp://username@hostname:port -hostkey="ssh-rsa " 
like image 6
user3454962 Avatar answered Oct 19 '22 21:10

user3454962