Question

SFTP not logging into droplet

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.


Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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