Questions tagged [sftp]

GENERAL SFTP SUPPORT IS OFF-TOPIC. Support questions may be asked on https://superuser.com. SSH File Transfer Protocol, a network protocol designed to provide secure file transfer and manipulation facilities over SSH (Secure Shell protocol).

The SSH File Transfer Protocol (also Secret File Transfer Protocol, Secure FTP, or SFTP) is a network protocol that provides file access, file transfer, and file management functionality over any reliable data stream. It was designed by the Internet Engineering Task Force (IETF) as an extension of the Secure Shell protocol (SSH) version 2.0 to provide secure file transfer capability, but is also intended to be usable with other protocols. The IETF of the Internet Draft states that even though this protocol is described in the context of the SSH-2 protocol, it could be used in a number of different applications, such as secure file transfer over Transport Layer Security (TLS) and transfer of management information in VPN applications.

This protocol assumes that it is run over a secure channel, such as SSH, that the server has already authenticated the client, and that the identity of the client user is available to the protocol.

This should not be confused with FTPS. For questions regarding FTPS, see the corresponding tag .

5135 questions
22
votes
3 answers

How to resolve Java UnknownHostKey, while using JSch SFTP library?

I'm running a java program where I transfer a file from one folder to another, using Java SFTP. The problem I'm having is that I'm getting the following error in my Java SFTP (using JSch)…
Caffeinated
  • 11,982
  • 40
  • 122
  • 216
21
votes
1 answer

SFTP Upload Download Exist and Move using Apache Commons VFS

I need a pure Apache Commons VFS solution/code/example for Uploading a local file to Remote Host Location Check if a File exists in Remote Host Location Downloading a Remote Host File to Local file location Move a file from one Remote Location to…
Ashok Goli
  • 5,043
  • 8
  • 38
  • 68
21
votes
6 answers

Adobe Brackets SFTP/FTP

I've been scouring the web since I got home from work, and to no avail I've yet to find a working Adobe Brackets SFTP(Preferably) or FTP extension. If anyone know's of one that I've possibly missed, please hook me up!
Brandon
  • 1,041
  • 4
  • 14
  • 32
21
votes
5 answers

What cause the error "Couldn't canonicalise: No such file or directory" in SFTP?

I am trying to use SFTP to upload the entire directory to remote host but I got a error.(I know SCP does work, but I really want to figure out the problem of SFTP.) I used the command as below: (echo "put -r LargeFile/"; echo quit)|sftp -vb -…
dmoney
  • 267
  • 1
  • 3
  • 10
21
votes
2 answers

How can convert inputstream to InputStreamsource or Datasource to attach in Spring JavaMail

I am getting inputstream from the Jsch channelSFTP like below. ChannelSftp channelSftp = (ChannelSftp) channel; InputStream input = channelsftp.get(unixPath); // unixPath is path to my file which is on SFTP server I have to attach the file in…
SRy
  • 2,901
  • 8
  • 36
  • 57
20
votes
1 answer

SFTP upload file Permission denied

I'm trying to upload excel file using SFTP to linux machine from my local windows PC. Here is my code: private void uploadToSftp() { try { ChannelSftp sftpClient = null; Channel channel = null; …
user9219740
20
votes
1 answer

Java SFTP upload using JSch, but how to overwrite the current file?

I am trying to upload two files to a server with SFTP using JSch. It works fine to upload the files if the directory is empty but I want to upload the same file over and over (just changing an id inside) but I can't figure out how to do this. There…
Sebastian L
  • 924
  • 2
  • 10
  • 20
20
votes
3 answers

Secure FTP using Windows batch script

I currently have batch scripts on different servers that transfer a csv file to an FTP server at a different location. My script looks similar to this: echo user ftp_user> ftpcmd.dat echo password>> ftpcmd.dat echo put…
etm124
  • 2,100
  • 4
  • 41
  • 77
19
votes
10 answers

Respond y(es) to psftp host key prompt

I am creating a script file programmatically and call psftp.exe as follows: psftp user@hostname.com -pw password -b psftpscript.txt but it prompts for user input The server's host key is not cached in the registry. You have no guarantee that the…
coder
  • 4,121
  • 14
  • 53
  • 88
19
votes
5 answers

How To Extract SFTP SSH Key From Key Cache in FileZilla FTP Client

I have connected to a server via SFTP using FileZilla and accepted adding the server's SSH key to the key cache in FileZilla. How can I extract this cached key to a keyfile so that may use it through other SFTP applications that require a keyfile…
Doug Porter
  • 7,721
  • 4
  • 40
  • 55
19
votes
3 answers

Copying or moving a remote file using SSH.NET with C#

I know that I can upload and download files from/to a SFTP server using SftpClient class of SSH.NET library but I am not sure how can this class be used for copying or moving a remote file on the SFTP server. I also did not find relevant material on…
user1451111
  • 1,735
  • 3
  • 18
  • 30
19
votes
1 answer

Schedule automatic daily upload with FileZilla

I would like to use FileZilla to automatically upload PDFs to my GoDaddy hosted site daily, replacing the previous day's sheets. Is there any way to do this? I read online that batch files might work, could someone post a sample version of a batch…
ajs
  • 335
  • 4
  • 5
  • 14
19
votes
1 answer

how to transfer a file through SFTP in java?

How to transfer a file through SFTP in java? I want sample code for SFTP client. I want to embed the SFTP server in my application and the client should able to send a file to my application. PS: This was asked for SFTP client. And This question is…
19
votes
10 answers

Can't get SFTP to work in PHP

I am writing a simple SFTP client in PHP because we have the need to programatically retrieve files via n remote servers. I am using the PECL SSH2 extension. I have run up against a road block, though. The documentation on php.net suggests that…
Chris Kloberdanz
  • 4,436
  • 4
  • 30
  • 31
19
votes
1 answer

SharpSSH invalid privatekey

I use SharpSSH to connect to a stfp-server. This for I need to add a privatekey-file like this: sftp.AddIdentityFile(KeyFilePath); But this throws an exception: invaid privatekey: C:\KeyFile\privatekey_2.ppk The file was created with puttygen and…
abc
  • 2,285
  • 5
  • 29
  • 64