SFTP(1) General Commands Manual SFTP(1) (NAME) sftp - (SYNOPSIS) sftp [-46AaCfNpqrv] [-B buffer_size] [-b batchfile] [-c cipher] [-D sftp_server_command] [-F ssh_config] [-i identity_file] [-J destination] [-l limit] [-o ssh_option] [-P port] [-R num_requests] [-S program] [-s subsystem | sftp_server] [-X sftp_option] destination (DESCRIPTION) sftp ftp(1) ssh(1) . ssh . destination [user@]host[:path] (URI) sftp://[user@]host[:port][/path] . destination path () sftp . path sftp (host) . path . (:) IPv6 [ ] . : -4 sftp IPv4. -6 sftp IPv6. -A (forwarding) ssh-agent(1) . . -a . . -B buffer_size sftp . (round trips) . . -b batchfile (Batch mode) (stdin) batchfile . ( sshd(8) ssh-keygen(1) ). `-' batchfile . sftp : get, put, reget, reput, rename, ln, rm, mkdir, chdir, ls, lchdir, copy, cp, chmod, chown, chgrp, lpwd, df, symlink, lmkdir. `-' ( -rm /tmp/blah*). (Echo) `@' . -@ls /bsd. -C ( -C ssh). -c cipher . ssh(1) . -D sftp_server_command sftp ( ssh(1)). "/path/sftp-server -el debug3". . -F ssh_config ssh(1). ssh(1) . -f (flush) . "fsync@openssh.com" . -i identity_file ( ) . ssh(1) . -J destination sftp (jump host) destination TCP . . ProxyJump . ssh(1) . -l limit Kbit/s. -N -b. -o ssh_option ssh ssh_config(5) . sftp . : sftp -oPort=24. ssh_config(5) . AddKeysToAgent AddressFamily BatchMode BindAddress BindInterface CASignatureAlgorithms CanonicalDomains CanonicalizeFallbackLocal CanonicalizeHostname CanonicalizeMaxDots CanonicalizePermittedCNAMEs CertificateFile ChannelTimeout CheckHostIP Ciphers ClearAllForwardings Compression ConnectTimeout ConnectionAttempts ControlMaster ControlPath ControlPersist DynamicForward EnableEscapeCommandline EnableSSHKeysign EscapeChar ExitOnForwardFailure FingerprintHash ForkAfterAuthentication ForwardAgent ForwardX11 ForwardX11Timeout ForwardX11Trusted GSSAPIAuthentication GSSAPIDelegateCredentials GatewayPorts GlobalKnownHostsFile HashKnownHosts Host HostKeyAlgorithms HostKeyAlias HostbasedAcceptedAlgorithms HostbasedAuthentication Hostname IPQoS IdentitiesOnly IdentityAgent IdentityFile IgnoreUnknown Include KbdInteractiveAuthentication KbdInteractiveDevices KexAlgorithms KnownHostsCommand LocalCommand LocalForward LogLevel LogVerbose MACs NoHostAuthenticationForLocalhost NumberOfPasswordPrompts ObscureKeystrokeTiming PKCS11Provider PasswordAuthentication PermitLocalCommand PermitRemoteOpen Port PreferredAuthentications ProxyCommand ProxyJump ProxyUseFdpass PubkeyAcceptedAlgorithms PubkeyAuthentication RekeyLimit RemoteCommand RemoteForward RequestTTY RequiredRSASize RevokedHostKeys SecurityKeyProvider SendEnv ServerAliveCountMax ServerAliveInterval SessionType SetEnv StdinNull StreamLocalBindMask StreamLocalBindUnlink StrictHostKeyChecking SyslogFacility TCPKeepAlive Tag Tunnel TunnelDevice UpdateHostKeys User UserKnownHostsFile VerifyHostKeyDNS VisualHostKey XAuthLocation -P port . -p . -q : ssh(1) . -R num_requests . . . -r (recursive) . sftp . -S program program . ssh(1) . -s subsystem | sftp_server SSH2 sftp . sshd(8) sftp . -v (logging level). ssh . -X sftp_option SFTP . : nrequests=value SFTP . . buffer=value / SFTP . . (INTERACTIVE COMMANDS) sftp ftp(1) . . . glob(3) (`\') . bye sftp. cd [path] path. path . chgrp [-h] grp path path grp. path glob(7) . grp GID . -h . "lsetstat@openssh.com" . chmod [-h] mode path path mode. path glob(7) . -h . "lsetstat@openssh.com" . chown [-h] own path path own. path glob(7) . own UID . -h . "lsetstat@openssh.com" . copy oldpath newpath oldpath newpath. "copy-data" . cp oldpath newpath copy. df [-hi] [path] ( path ) . -h << >> . -i inode . "statvfs@openssh.com" . exit sftp. get [-afpR] remote-path [local-path] remote-path . . remote-path glob(7) . local-path local-path . -a . . . -f fsync(2) . -p . -R . sftp . help . lcd [path] path. path . lls [ls-options [path]] path path . ls-options ls(1) . path glob(7) . lmkdir path path. ln [-s] oldpath newpath oldpath newpath. -s (symbolic link) (hard link) . lpwd . ls [-1afhlnrSt] [path] path path . path glob(7) . ls : -1 . -a (`.') . -f . (lexicographical) . -h : (K=1024, M=1048576 ) . -l . -n . -r . -S . -t . lumask umask umask umask. mkdir path path. progress . put [-afpR] local-path [remote-path] local-path . . local-path glob(7) . remote-path remote-path . -a . . . -f fsync(2) . "fsync@openssh.com" . -p . -R . sftp . pwd . quit sftp. reget [-fpR] remote-path [local-path] remote-path. get -a. reput [-fpR] local-path [remote-path] local-path. put -a. rename oldpath newpath oldpath newpath. rm path path. rmdir path path. symlink oldpath newpath oldpath newpath. version sftp. !command command . ! . ? (help). (SEE ALSO) ftp(1), ls(1), scp(1), ssh(1), ssh-add(1), ssh-keygen(1), ssh_config(5), glob(7), sftp-server(8), sshd(8) T. Ylonen and S. Lehtinen, SSH File Transfer Protocol, draft-ietf-secsh-filexfer-00.txt, January 2001, work in progress material. Linux 6.12.107+deb13-amd64 December 6, 2024 Linux 6.12.107+deb13-amd64