DEV Community

Dênis Mendes
Dênis Mendes

Posted on • Edited on

2 1

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)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay