Is it possible to use rsync over sftp (without an ssh shell)?

Unfortunately not directly. rsync requires a clean link with a shell that will allow it to start the remote copy of rsync, when run this way. If you have some way of running long-lived listening processes on the host you could try starting rsync manually listening for connections on a non-privileged port, but most techniques … Read more

SFTP logging: is there a way?

OpenSSH versions 4.4p1 and up (which should include the latest version with CentOS 5) have SFTP logging capability built in – you just need to configure it. Find this in your sshd_config (in centos, file /etc/ssh/sshd_config): Subsystem sftp /usr/libexec/openssh/sftp-server and change it to: Subsystem sftp /usr/libexec/openssh/sftp-server -l INFO INFO is just one level of detail … Read more

Allow SFTP but disallow SSH?

Starting with version 4.9 OpenSSH (not available in centos 5.x but ChrootDirectory feature was backported) has an internal-sftp subsystem: Subsystem sftp internal-sftp And then block other uses: Match group sftponly ChrootDirectory /upload/%u X11Forwarding no AllowTcpForwarding no AllowAgentForwarding no ForceCommand internal-sftp Add your users to the sftponly group. The chroot directory must be owned by root, … Read more

OpenSSH: Difference between internal-sftp and sftp-server

Both sftp-server and internal-sftp are part of OpenSSH. The sftp-server is a standalone binary. The internal-sftp is just a configuration keyword that tells sshd to use the SFTP server code built-into the sshd, instead of running another process (what would typically be the sftp-server). The internal-sftp was added much later (OpenSSH 4.9p1 in 2008?) than … Read more

What port does SFTP use?

While TCP port 22 is the general right answer, this is dependent on the fact that SSH is configured to use the standard port and not an alternative port. As SFTP runs as a subsystem of SSH it runs on whatever port the SSH daemon is listening on and that is administrator configurable.

Differences between SFTP and “FTP over SSH”

Here is the difference: SFTP (SSH file transfer protocol) is a protocol that provides file transfer and manipulation capabilities. It can work over any reliable data stream, but is typically used with SSH “FTP over SSH” uses the regular old FTP protocol, but an SSH tunnel is placed between client and server. You probably won’t find libraries for … Read more

SFTP upload file Permission denied

You seemed to upload your local file “C:\Workspace\upload-file\test.xlsx” to remote directory, “/var/www/folder” on SFTP. I guess you have all permissions for reading,writing,executing etc on your local file(“C:\Workspace\upload-file\test.xlsx”), but your remote folder, “/var/www/folder”, might not accept your application’s access including “upload” action. SOLUTION: The most simplest way to solve this issue is just granting all permission for all users to do anything … Read more

Upload file to SFTP using PowerShell

There isn’t currently a built-in PowerShell method for doing the SFTP part. You’ll have to use something like psftp.exe or a PowerShell module like Posh-SSH. Here is an example using Posh-SSH: Some additional notes: You’ll have to download the Posh-SSH module which you can install to your user module directory (e.g. C:\Users\jon_dechiro\Documents\WindowsPowerShell\Modules) and just load … Read more