Daniel Escobedo

Linux SFTP Command

Linux SFTP Command

The most basic way to start an SFTP session in the command line is via:

sudo sftp server.hostname.com

Note: I am including sudo in these examples because at least in my experience, you usually need to prepend it in professional environments in order to run commands with the security privilege of root. It also helps me copy and paste it as is to the command line.

If you have a specific user account, use:

sudo sftp [email protected]

If you want to authenticate an SFTP session with a private key, use:

sudo sftp -o IdentityFile=~/path/to/privatekey.pem [email protected]

View the manual for SFTP by typing:

man sftp

Daniel Escobedo

I'm a JavaScript developer who loves to code. I'm always reading and learning new technologies and tools to better my skills and workflow.

View Comments
Next Post

Redux-Saga External Event Listener

Previous Post

JavaScript Promises