DEV Community

Hamza Afridi
Hamza Afridi

Posted on

Setting up sftp on iterm and terminal on mac

When I switched to MacOS as my main development machine, I quickly noticed that the standard terminal or iTerm2 wouldn't autocomplete SFTP commands when using the TAB key. Additionally, the arrow up and down keys didn't work either. This issue arises because MacOS doesn't come with OpenSSH built-in.

To install OpenSSH on your Mac, follow these steps:

  1. First, check the version of SFTP you are using by entering the following command in the terminal:
which sftp
Enter fullscreen mode Exit fullscreen mode

The output will look something like this:

/usr/bin/sftp
Enter fullscreen mode Exit fullscreen mode
  1. Install OpenSSH using Homebrew:
brew install openssh
Enter fullscreen mode Exit fullscreen mode
  1. After the installation, verify if SFTP is installed correctly by entering:
brew list openssh
Enter fullscreen mode Exit fullscreen mode

After doing this, you can enjoy faster development and server access.

Top comments (0)