Friday 19 April 2024

How to connect to VPS with Private Key on Mac OS

1. Use the cd command to navigate to the directory where your private key file is stored. For example, if your private key is in the Downloads folder, you can navigate there using: 

cd ~/Downloads

2. Set appropriate permissions for your private key: Your private key file should have restricted permissions to ensure security.

chmod 600 your_private_key.pem

3. Connect to the VPS using SSH: Use the ssh command to connect to your VPS. The command syntax is as follows:

ssh -i your_private_key.pem username@your_vps_ip

4. Switch to root account:

sudo -i

5. Read file content:

nano filename.conf

No comments:

Post a Comment

Fix Macbook touchbar not working

To reset Touch Bar on MacBook Pro, you need to restart the Touch Bar and Control Strip by running these two commands in Terminal: 'sudo...