DEV Community

Dênis Mendes
Dênis Mendes

Posted on • Edited on

Connect to SFTP server using command line on macOS

Hi there!

It's here how I connect to sftp server using only command line tool from macOS:

sftp -P replace_with_server_port -i replace_with_your_ssh_private_file replace_with_server_username@replace_with_server_host

Maybe you will be asked about password you set for ssh private key:

Enter passphrase for key '.ssh/ssh_private_file_path':

And then after you type the password you will see that:

Connected to server_host:
sftp>
Enter fullscreen mode Exit fullscreen mode

It's done! You're in.

Now if you want to send a file you need to type:

sftp> put your_file_name_with_extension

Top comments (0)