SSH and SFTP Connect with the macOS Terminal or a Linux terminal

Deutsch

Connect with the macOS Terminal or a Linux terminal

Sign in over SSH and copy files with sftp and scp from the Terminal on a Mac or any Linux computer.

Before you begin

Your key is on your site (see Add or remove an SSH key).

Steps

  1. Open Terminal.
  2. Copy the Connect line from the SSH & SFTP tab, for example ssh -p 7822 login@db.my.se7enx.com, paste it and press Enter.
  3. The first time, compare the fingerprint with the one on the tab and type yes.
  4. Type your key's passphrase if you set one.
  5. You are on the server: cd httpdocs takes you to your website. Type exit to leave.

Result

You are signed in over SSH.

What to do next

Save typing with an entry in ~/.ssh/config:

Host mysite
    HostName db.my.se7enx.com
    Port 7822
    User login
    IdentityFile ~/.ssh/id_ed25519

Then ssh mysite is enough.

Copy files with sftp -P 7822 login@db.my.se7enx.com (commands put, get, ls, cd), or with scp -P 7822 file.zip login@db.my.se7enx.com:httpdocs/. Note the capital -P for sftp and scp.