Report this

What is the reason for this report?

SFTP not logging into droplet

Posted on October 5, 2014

I’m sorry if this is a noobish question; I searched the archives and didn’t find anything that worked for me. Hours of frustrated searching in tutorials and attempts at brute forcing the problem have turned up nothing, so I’ve humbly come here to ask for your help.

I’m trying to use SFTP to upload a test template for a website I want to put up, but upon entering

 SFTP [user]@[ip]-p[ssh port]

I get this response:

usage: sftp [-1246aCfpqrv] [-B buffer_size] [-b batchfile] [-c cipher]
          [-D sftp_server_path] [-F ssh_config] [-i identity_file] [-l limit]
          [-o ssh_option] [-P port] [-R num_requests] [-S program]
          [-s subsystem | sftp_server] host
       sftp [user@]host[:file ...]
       sftp [user@]host[:dir[/]]
       sftp -b batchfile [user@]host

followed by my computer dropping back to its native prompt. This happens on Windows 8.1, Ubuntu Linux, MacOSX, and PCBSD, so I’m absolutely 100 percent sure it isn’t an issue on my end.

SSHing into my droplet works fine. I’ve had no issues with that so far. Please, at least set me off in the right direction.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

From the usage instructions:

usage: sftp [-1246aCfpqrv] [-B buffer_size] [-b batchfile] [-c cipher]
          [-D sftp_server_path] [-F ssh_config] [-i identity_file] [-l limit]
          [-o ssh_option] [-P port] [-R num_requests] [-S program]
          [-s subsystem | sftp_server] host

The correct command is:

sftp -P port user@ip

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.