How do I connect via SSH on an Apple Mac?

To connect via SSH on a Mac you can follow the instructions below:

  1. Log in toĀ stackcp.com.
  2. Head toĀ Manage HostingĀ and selectĀ ManageĀ on the hosting package you want to connect to.
  3. Select theĀ SSH AccessĀ icon.
  4. You’ll now need to generate a public key, on a Mac this is done via theĀ TerminalĀ utility. OpenĀ TerminalĀ on the Mac.
  5. Enter the following command into the Terminal:

ssh-keygen

  1. PressĀ Enter
  2. You’ll be prompted to enter theĀ locationĀ that you want the public and private keys saving. In this case, we’ll keep this as theĀ default location. PressĀ Enter
  3. You’ll be prompted for aĀ passphrase, in this guide we’ll just leave this empty. If you enter one, make sure you remember this as you’ll be prompted for this later. PressĀ Enter.
  4. You’ll be asked to confirm the passphrase - since we’ve left this empty just pressĀ Enter.
  5. Your keys will have been generated and the public key will have been saved in a specified location, in our example, it has been saved in:

/Users/user/.ssh/id_rsa.pub.

  1. Copy the path and enter the following command:

cat /Users/user/.ssh/id_rsa.pub.

  1. The key will be outputted, copy the whole key from the start to the end.
  2. Paste the key back into theĀ Public KeyĀ field in theĀ SSH AccessĀ section. The handle should be added automatically. PressĀ Add Public Key.
  3. Please note that can take up to 5 minutes.
  4. Head back toĀ TerminalĀ and enter theĀ SSH usernameĀ andĀ hostnameĀ found at the top of theĀ SSH AccessĀ section, it should be something likeĀ domain.com@ssh.stackcp.comĀ You’ll need to prefix it with theĀ sshĀ command as follows:

ssh domain.com@ssh.stackcp.com

  1. Ā You’ll be prompted to confirm you would like to connect, simply typeĀ yesĀ and press enter.

You should have successfully connected via SSH from your Mac to your hosting package at HostMaria - Cloud.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How do I run Composer via SSH?

At HostMaria - Cloud we run multiple different versions of PHP. On our SSH servers, the...

How do I connect via SSH?

It's only recommended that you connect to your package via SSH if you're familiar with the...

How do I connect via SSH using 2FA?

It's only recommended that you connect to your package via SSH if you're familiar with the...

How do I import a .sql file via the command-line?

If you've set up SSH access for a package then you can run the following command-line...