View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
David Robins > Net-SFTP-0.10 > psftp


Annotate this POD


New  13
Open  4
View/Report Bugs


psftp - Perl secure file transfer client


psftp [-v] [-C] hostname


psftp is an interactive SFTP client written in Perl, using the Net::SFTP libraries. It is very similar in functionality to the sftp program that is part of both OpenSSH and ssh2. Because it is built upon the SSH implementation in Net::SSH::Perl, it supports many features of SSH, such as public key authentication and compression. psftp (and SFTP in general) requires the use of the SSH2 protocol; thus, you must have the necessary libraries installed in order to use SSH2 in Net::SSH::Perl.

On startup, psftp logs into the specified hostname, then enters an interactive command mode. The supported list of commands is below in INTERACTIVE COMMANDS.


psftp supports the following options:


Enables compression (via the compression option to the Net::SSH::Perl constructor).


Enables debugging messages, both in Net::SFTP and in Net::SSH::Perl, via the debug options to the constructors.


In interactive mode, psftp understands a subset of the commands supported by sftp. Commands are case insensitive.

cd path

Change remote directory to path.

exit / quit

Quit sftp.

get remote-path [local-path]

Retrieve the file remote-path and store it in the local machine. If the local path name is not specified, it is given the same leaf name it has on the remote machine. Copies the remote file's full permission and access times, as well.

h / ?

Display help screen.

ls [path]

Display remote directory listing of either path or current working remote directory if path is unspecified.

mkdir path

Create remote directory specified by path.

put local-path remote-path

Upload the file local-path and store it on the remote machine. Copies the local file's full permission and access times, as well.


Display remote working directory.

rename oldpath newpath

Rename remote file from oldpath to newpath.

rmdir path

Remove remote directory specified by path.

rm path

Remove remote file specified by path.


Show SFTP version.


Please see the Net::SSH::Perl manpage for author, copyright, and license information.

syntax highlighting: