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
0 Comments