So, you should also have a reasonably strong login password on your Mac!
Ssh and sftp for mac mac#
It is important to protect your private key by making sure you have to enter a password to log into your Mac as well, because once you are logged into your Mac, then it is a trivial matter to obtain your private key password from the Mac's Keychain application. If you don't tick the box, then next time you log out and back into your Mac and try this connection again, you will be asked for the password again. Enter your password and tick the box to save the password to your Keychain (read below!). Your Mac will now ask you for the password for your private key. ssh/john to .uk as user krystald (phew!) - Just replace your private key file name, krystald with your own cPanel username, and .uk with your own Home Server name or your primary domain name. ssh/john tells ssh to connect using ( -p) Port 722 and using ( -i) Identity within the private keyfile at. ssh directory and go back to our local home directory on our Mac cd ~/Now we have to connect to the webserver using the ssh command. Log in using your keys OK, lets leave the.
That's it, you're now ready to use your private key! Back on the Manage SSH Keys cPanel screen, click Manage for your key (as shown) Then, on the Manage Authorization screen just click the Authorize button and you should receive a confirmation that the key has been authorised. The next step is to authorise your public key. If you don't give your key a name, it will default to being called id_dsa. Give your public key a name, as shown (this becomes the filename your public key is saved as) and click the Import button. Paste your public key into the public key text box. Click the Import Key button to get the Import SSH Key screen.
When you hit enter you will be asked to provide a Passphrase. Replace john with a single word (no spaces) that will help you identify the files that the command will generate. Enter the following command carefully: ssh-keygen -t rsa -b 2048 -C "John Smith" -f johnJust replace John Smith with your own name (keeping the quotation marks, they're important!). ssh pwdThis should then echo this back to you: /Users//.sshNow we need to generate your keypair. Once Terminal is open, we need to change change directory to the hidden.
Ssh and sftp for mac how to#
How to use public/private keys for SSH and SFTP (MacOS)