Remote SSH Access

AWSomeVikashAWSomeVikash
1 min read

If we have two servers, so if we want to connect server A to server B, the private key should be on server A, and server B should have the

public key.

Public key, that is, is written in an authorised file, and the private key is put in the SSH files.

So the private key has server A, and the public key has server B.

In server A, we navigate to the CD .ssh and create a key using the command ssh -keygen. We then confirm that the key is ready by entering yes.

Next, we move to server B and locate the public key. We navigate to the CD .ssh and find the file named authorised_keys. Inside, we find the public key that we generated on server A. We open the file in Vim and copy the key password. Then, we paste the copied key into server B using the same command.

Finally, we return to server A and type ssh -i id_ed25519 ubuntu@3.253.55.75. This command uses the specified private key file to connect to server A. After entering the username (ubuntu) and the server IP address (3.253.55.75), we are successfully connected to server B.

0
Subscribe to my newsletter

Read articles from AWSomeVikash directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

AWSomeVikash
AWSomeVikash

๐Ÿš€ Hi, I'm Vikash Patel โ€” a passionate AWS & DevOps enthusiast, sharing my complete learning journey and real-world implementations. ๐Ÿ“˜ On this blog, Iโ€™m publishing a full DevOps + AWS roadmap โ€” from basics to advanced, covering: ๐ŸŸก AWS Services: EC2, S3, IAM, CloudWatch, Billing, and more ๐Ÿง Linux commands & scripting โš™๏ธ CI/CD pipelines with GitHub Actions & Jenkins ๐Ÿงฑ Infrastructure as Code using Terraform ๐Ÿ“ˆ Monitoring, Alerts & Troubleshooting ๐Ÿ’ก Every post is beginner-friendly โ€” focused on clarity, practical use-cases, and hands-on solutions. ๐ŸŒ Iโ€™m also building my presence in the AWS Community, sharing what I learn, and learning from others. ๐ŸŒฑ Whether you're starting your cloud journey or looking for practical DevOps solutions, this blog is for you.