-
Generate Key Pairs:
- Use
ssh-keygenon your server to generate a public and private key pair. Name thempublic-key.jsonandprivate-key.json.
- Use
-
Install SSH:
- Download and install the
sshexecutable from your local machine.
- Download and install the
-
Generate Keys on Local Machine:
- Use
sshto generate both keys on your local machine, entering the server's public key details.
- Use
-
Connect Public Key to Private Key:
- Use the SSH client command
ssh -i <private-key>.json -p port <remote-server>, whereportis the port the remote server uses (e.g., 22 for HTTP, 88 for HTTPS).
- Use the SSH client command
-
Verify Connection:
- Use
ssh -i <private-key>.json <remote-server>to log in. If successful, the connection is established.
- Use
-
Permissions and Server Configuration:
Ensure both the private key and SSH session have the appropriate permissions. Check the server's IP and port for connection attempts.
-
Private Key Validation:
- Use
pmint <private-key>.jsonto verify the key's validity.
- Use
-
Troubleshooting:
If the connection fails, troubleshoot by checking the server's IP and port, and consider using a different method for data transfer.
By following these steps, you can successfully connect your private key to your remote server using SSH.


