How to SSH from One Linux EC2 to another

Поделиться
HTML-код
  • Опубликовано: 9 сен 2024
  • How to SSH from One EC2 to another. This video demonstrates that. You need to copy the private key of the destination EC2's keypair to the .ssh folder of the originating EC2.
    ⛳ AWS Hands-on for Beginners playlist:
    • AWS Hands-on for begin...
    ⛳ SSH (Secure Shell or Secure Socket Shell), is a network protocol that gives users, particularly system administrators, a secure way to access a computer over an unsecured network. It also refers to the suite of utilities that implement the SSH protocol. Secure Shell provides strong password authentication and public key authentication, as well as encrypted data communications between two computers connecting over the internet. SSH is widely used by network administrators to manage systems and applications remotely, enabling them to log in to another computer over a network, execute commands and move files from one computer to another.
    ⛳ SSH from EC2 to another EC2 - Method 2:
    • How to SSH from one EC...

Комментарии • 14

  • @UnusAWS
    @UnusAWS  Год назад

    This video shows how you can SSH from one EC2 to another. It shows where to save your private key file in the originating EC2. Whether you need to use the same name as the keypair name or you can use a different name for the private key? Also, what should be the permission setting for the private key file.

  • @zahraelhaddi6980
    @zahraelhaddi6980 3 месяца назад +1

    thank you so much its great that you included the error and its dolution as well.

  • @vipulsingh2846
    @vipulsingh2846 2 месяца назад

    nice explanation really helpful.

  • @shyamprasad1363
    @shyamprasad1363 2 месяца назад +1

    Awesome.. Thanks for sharing...

  • @prudvi6338
    @prudvi6338 4 месяца назад +1

    Thanks a lot sir

  • @AmishaSharma_1
    @AmishaSharma_1 День назад

    When I'm trying to ssh, i am getting a promp for entering password, why?

  • @kidistamosa9084
    @kidistamosa9084 Год назад +1

    Thank you !

  • @AdityaMoray-y9w
    @AdityaMoray-y9w 2 месяца назад +2

    Hi sir can't we directly ssh by changing settings in /etc/ssh/sshd_config and then use ssh-keygen and ssh-copy-id to login without password?

    • @UnusAWS
      @UnusAWS  2 месяца назад +1

      Thanks @AdityaMoray-y9w for bringing up this point. I will update this method as well in Video description.

  • @ajinkyayeole5574
    @ajinkyayeole5574 2 месяца назад

    Can we do this without CMD...

  • @ajinkyayeole5574
    @ajinkyayeole5574 2 месяца назад

    Hi unus i need help about this I using office laptop for practice of aws. As I am using office laptop I not able to use cmd of laptop. But i can access Awa console through browser. How can i ssh to my rhel server from ubuntu with using cmd???

    • @UnusAWS
      @UnusAWS  2 месяца назад

      You can try the below from cloudshell. You can access cloudshell from the AWS console mainpage. Issue below commands to create keypair and launch EC2
      # Create keypair
      aws ec2 create-key-pair --key-name MyKeyPair --query 'KeyMaterial' --output text > MyKeyPair.pem
      # It creates the keypair MyKeyPair.pem in your cloudshell home directory.
      # change permissions
      chmod 400 MyKeyPair.pem
      #Find a Ubuntu or RHEL image from EC2 launch page.
      ex: ami-0583d8c7a9c35822c
      # Create EC2 with the above AMI + above keypair.
      aws ec2 run-instances --image-id ami-0583d8c7a9c35822c --count 1 --instance-type t2.micro --key-name MyKeyPair --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=MyRHELInstance}]'
      # Now, you can SSH from cloudshell to your EC2. Use the connection string under EC2 console > Select instance > Click on Connect > SSH client > connection string under 'Example'

  • @shyamprasad795
    @shyamprasad795 5 месяцев назад

    How to do this for windows machines?

    • @UnusAWS
      @UnusAWS  5 месяцев назад

      You could refer to these docs which talks about this topic:
      docs.aws.amazon.com/AWSEC2/latest/UserGuide/openssh.html
      docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/connecting_to_windows_instance.html