No video

How to SSH from one Linux EC2 instance to another

  Рет қаралды 49,961

NamrataHShah

NamrataHShah

Күн бұрын

This video showcases how to SSH from one Linux EC2 instance to another using the target EC2 instance's Private IP address.
Do subscribe to my channel and provide comments below. If you would like me to create a video on any topic then mention it in the comments.
This channel is run by Namrata Shah (Nam) who is a dynamic passionate technical woman leader and a life long learner. She has over 16+ years of professional information technology consulting experience. Namrata has been receiver of Microsoft’s Prestigious Most Valuable Professional award (MVP) for two consecutive years and was recognized as Virtual Technology Specialist for BizTalk. She has several certifications under her belt including AWS CSAA, PMP (Certified till 2020), CSM, CSPO, CSD, Six Sigma (Green Belt), SAFe and TOGAF 9.1 Foundation certified.

Пікірлер: 141
@rameshselva4812
@rameshselva4812 2 жыл бұрын
Ohhh. Thank you so much namrata. This is what exactly my trainer gave us as a task. He taught with windows servers and gave task in Linux. And I executed successfully from this video. Thank you so much once again.
@gerried1218
@gerried1218 3 жыл бұрын
I have been working on this for the past 6 hours and everywhere I checked did not give me the solution. This is the best solution so far. Thanks very much
@NamrataHShah
@NamrataHShah 3 жыл бұрын
Glad it helped!
@sahithipondugula8316
@sahithipondugula8316 3 жыл бұрын
Thanks alot Namrata!! I was trying this for almost 4 hrs and now finally did!
@NamrataHShah
@NamrataHShah 3 жыл бұрын
Glad it was helpful
@shankavaramanagha9672
@shankavaramanagha9672 4 жыл бұрын
Hi Namrata, This is the second time, I have benefitted by watching your video. Thanks a lot! Keep the good work going --- Regards Prashant
@NamrataHShah
@NamrataHShah 4 жыл бұрын
Glad it helped
@178pal
@178pal 4 жыл бұрын
Awesome.. well explained.. I was stuck at this point for more than 3 hours.. Thanks
@rishisharma6246
@rishisharma6246 4 жыл бұрын
Thank you so much... Stuck on this from 2 days.. Thank you so much..🙏
@NamrataHShah
@NamrataHShah 4 жыл бұрын
Glad it helped
@rigobertndifon7518
@rigobertndifon7518 4 жыл бұрын
wonderfully demonstrated.Thank you NamrataHSHah
@NamrataHShah
@NamrataHShah 4 жыл бұрын
Glad you liked it!
@willcalde
@willcalde Жыл бұрын
Thank you so much namrata, you are my hero :)
@yanonirmal
@yanonirmal 5 ай бұрын
Thankyou so much for the video well explained !!!
@sridharreddy2876
@sridharreddy2876 3 жыл бұрын
Hi Namrata, thanks for your video Its helped me a lot to understand this issue and resolved for me.
@NamrataHShah
@NamrataHShah 3 жыл бұрын
Glad it was helpful!
@vishnu-i8l
@vishnu-i8l 29 күн бұрын
Nice video and it is a understandable way
@harrysingh6163
@harrysingh6163 2 жыл бұрын
I appreciate the job, great video. Done the job in one go.
@RahulSingh-sn3er
@RahulSingh-sn3er 5 жыл бұрын
TNX for making such imp video, its really very helpful ....
@ashrafshaik8051
@ashrafshaik8051 4 жыл бұрын
A very heartful thanks Namrata It's very helpful to me
@jitendrasena1263
@jitendrasena1263 5 жыл бұрын
Thanks Namrata Mam.....i was needed it
@jaanvaan1468
@jaanvaan1468 4 жыл бұрын
I tried same for 2 centos machines in AWS ....but is asking for pem password...But , I haven't set any password for pem file
@AdityaMoray-y9w
@AdityaMoray-y9w Ай бұрын
Hi thank you for the video.Can you SSH without the keypair?
@VigilanteMian
@VigilanteMian 4 жыл бұрын
Very nicely explained, Namrata.
@NamrataHShah
@NamrataHShah 4 жыл бұрын
Glad it was helpful
@kaykann7880
@kaykann7880 4 жыл бұрын
Well explained. Thanks Namrata baji
@goldentouch7308
@goldentouch7308 Жыл бұрын
Thank you
@rfrancoi
@rfrancoi 5 жыл бұрын
Thank you for your hard work. Very much appreciated.
@kartheekbankapalli8437
@kartheekbankapalli8437 Жыл бұрын
Thankyou so much..my doubt clear..❤
@pullareddykotla9836
@pullareddykotla9836 5 жыл бұрын
Thank you for making nice video and easly grabed it.
@rajrajendran410
@rajrajendran410 4 жыл бұрын
Thank you so much ,it was very helpful for me , you taught easy way.
@juigajjar8672
@juigajjar8672 3 жыл бұрын
It was a great help
@NamrataHShah
@NamrataHShah 3 жыл бұрын
Glad it helped
@dhineshprabakaran1786
@dhineshprabakaran1786 3 жыл бұрын
Thanks for this valuable sharing. Please continue sharing :-)
@NamrataHShah
@NamrataHShah 3 жыл бұрын
Thank you, I will
@famss786
@famss786 3 жыл бұрын
Thanks - great videoes
@NamrataHShah
@NamrataHShah 3 жыл бұрын
Thank you
@TheKartik555
@TheKartik555 5 жыл бұрын
Hi Namrata thanks for sharing the knowledge it worked, It would be helpful if you can explain on command functionalities as well.
@NamrataHShah
@NamrataHShah 5 жыл бұрын
Kindly elaborate of command functionalities. I have a few videos on CLI check them out
@parikshitkudalkar2854
@parikshitkudalkar2854 3 жыл бұрын
thanks a lot !! you explained in very easy way !! please keep making videos !!
@ranjithkumar2034
@ranjithkumar2034 3 жыл бұрын
Nice info ,, keep doing great work
@NamrataHShah
@NamrataHShah 3 жыл бұрын
Thank you.
@edsonsilva8397
@edsonsilva8397 2 жыл бұрын
Thank you very much!! You helped me a lot!
@balajimuthukali7487
@balajimuthukali7487 Жыл бұрын
Thanks mam
@zalakbensureshkumarprajapa1060
@zalakbensureshkumarprajapa1060 3 жыл бұрын
How do I Configure "authorized_keys" for an ssh server and "known_hosts" for an ssh client on each VM instance to allow passphraseless ssh login between two instance.
@supersaiyan3704
@supersaiyan3704 3 жыл бұрын
Thank you so much mam. It worked like a charm
@NamrataHShah
@NamrataHShah 3 жыл бұрын
Great 👍
@sivaramanr7781
@sivaramanr7781 3 жыл бұрын
Thank you very much, it's really useful
@NamrataHShah
@NamrataHShah 3 жыл бұрын
Glad it helped
@dhwanishah4093
@dhwanishah4093 2 жыл бұрын
Hi Namrata, Why second time putty asked about Enter passphrase for key"", How to solve that?
@sainath691
@sainath691 3 жыл бұрын
Thanks you
@NamrataHShah
@NamrataHShah 3 жыл бұрын
Welcome
@sivaramakrishnans4133
@sivaramakrishnans4133 3 жыл бұрын
thanq mam u saved me
@NamrataHShah
@NamrataHShah 3 жыл бұрын
Glad it helped
@phoenix281287
@phoenix281287 2 жыл бұрын
@NamrataHShah: Will these steps work if I try to SSH from one linux EC2 instance to another in a different VPC?
@vlsi227
@vlsi227 5 жыл бұрын
Hi Namrata Thanks very much for sharing this valuable knowledge. I'm unable connect public ec2 to other private ec2. Can you Give details and how you connected the subnets in two servers.
@NamrataHShah
@NamrataHShah 5 жыл бұрын
If the subnets are in the same vpc then there is trust established already if not then u need to perform vpc peering and establish trust
@TheEternalBlizzard
@TheEternalBlizzard 2 жыл бұрын
Can we use it to connect from one instance to another if both are located in *Different Regions* ?! Please confirm. Thanks!
@kaykann7880
@kaykann7880 4 жыл бұрын
Hello namrata baji. Problem with ssh to linux ec2c. using putty pageant. my pc-->internet-->ec2-a public(ssh-ok)--->ec2-b private(ssh-ok)----vpc peering----ec2-c private(ssh-access-denied-publickey issue). inbound SG ssh port 22 open for ec2-c. vpc peering active and I can ping to ec2-c. all pkk uploaded to pageant and using check mark "agent forward" in putty. any idea?
@AmanSingh-xi3xl
@AmanSingh-xi3xl 3 жыл бұрын
Thanks Namrata- what was the command you used after you connected to the private server from public ? and you created a file in the target server ?
@shaikaslam6963
@shaikaslam6963 4 жыл бұрын
Hi Namrata, I have followed all the steps as you have shown in this video, but at last part after changing the file permission to 600, I'm still getting the permission denied error as below Permission denied (publickey,gssapi-keyex,gssapi-with-mic) Could you please assist me on the same? Thanks
@pawanshetty5092
@pawanshetty5092 Жыл бұрын
have u got solution for this?
@mohammedrizwan5359
@mohammedrizwan5359 2 жыл бұрын
Awsome thank you so much
@DavidBenOtto
@DavidBenOtto Жыл бұрын
but what if the target has the public IP address? Should the process be the same?
@mahendrarajgude4070
@mahendrarajgude4070 5 жыл бұрын
Useful video. Thanks
@tmaiswarya9699
@tmaiswarya9699 3 жыл бұрын
Hi mam,,I got a question in AWS,in my company two developers (developer A and developer B) they have two instance(instance A and instance B) , developer A can access only instance A and developer B can access only instance B,
@SohailKhan-qk4gl
@SohailKhan-qk4gl 3 жыл бұрын
Hi. Why doesn't your target machine have a public IP address?
@nagarajuboddupally-bw8gw
@nagarajuboddupally-bw8gw 4 ай бұрын
hi in target server how can u create without public key. its confused me i connected same i followed ur vedio, i got permission denied i given the chmos 600 filename but it showing same source server only. not connecting to target server
@sushmitha156
@sushmitha156 5 жыл бұрын
Hi Namratha can you please show how to ssh 2 instaces of different vpc
@NamrataHShah
@NamrataHShah 5 жыл бұрын
Methodology is the same as long as the VPCs are peered. Refer to my VPC peering videos.
@balivadasairaghavahemanth1466
@balivadasairaghavahemanth1466 3 жыл бұрын
is this about Connecting private instance with public instance in EC2 linux ??
@chandureddim4327
@chandureddim4327 3 жыл бұрын
mam, where to learn these commands and what are these commands are these ssh commands or linux commands the same steps are worked for ubuntu to.. please reply me mam what are these commands thank you.. and i just felt got saved from corona mam.thank you..for this mam.
@arig2519
@arig2519 4 жыл бұрын
Good one
@sushilmusande9208
@sushilmusande9208 3 жыл бұрын
Hello Namratah, Is there any way to connect to target if i lose/replace the source machine aws key? I replaced key of source machine and now i'm not able to ssh to target? Thanking you in advance for your suggestion/Help.😊
@vamsikrishna2330
@vamsikrishna2330 4 жыл бұрын
Thanks much.. this helped a lot
@sunilchaudhari5248
@sunilchaudhari5248 4 жыл бұрын
can u explain if how we can share public key with private instance & connect using public key instead of private key(.pem)?
@fbsoul1
@fbsoul1 3 жыл бұрын
thanks
@NamrataHShah
@NamrataHShah 3 жыл бұрын
You're welcome!
@shubhamrendalkar6791
@shubhamrendalkar6791 3 жыл бұрын
I have connected as u shown bt not able to copy files. Please help me with this issue
@CoolBishop1997
@CoolBishop1997 4 жыл бұрын
very nice tutorial
@sanketshahane178
@sanketshahane178 4 жыл бұрын
thank u mam for this tutorial..
@kingstanm8671
@kingstanm8671 5 жыл бұрын
cheers ka, it is quite simple. thanks. peace.
@aswiniravella8037
@aswiniravella8037 4 жыл бұрын
ma'am why we don't have public IP into the target machine.
@NamrataHShah
@NamrataHShah 4 жыл бұрын
Think and let me know ...
@GovindPalanisamy1
@GovindPalanisamy1 5 жыл бұрын
Thanks, this is working for me with ec2-user. I have postgres user and trying to do the same way, but errors out. Can you please help me here?
@NamrataHShah
@NamrataHShah 5 жыл бұрын
This method is for AWS EC2 communication ..
@adeelshamas3337
@adeelshamas3337 3 жыл бұрын
I downloaded the .ppk key used putty to ssh into the source ec2, but can I get .pem file?
@Noses.
@Noses. 3 жыл бұрын
Can uses this to log from aws linux to another centos 7 server at home
@pauleingrid
@pauleingrid 3 жыл бұрын
Is it possible to create 3 instances and deploy on each(database, nodeJs, ANgularjs) and then conect the three of them?
@i.oawani-mayaki339
@i.oawani-mayaki339 4 жыл бұрын
Very simple steps...unfortunately I got "Permission denied (publickey)" as an error message. I followed the steps
@cyliaselloum8001
@cyliaselloum8001 4 жыл бұрын
I.O Awani-Mayaki the same error for me
@jobethagulan8645
@jobethagulan8645 4 жыл бұрын
change the chmod option to 400
@shaikaslam6963
@shaikaslam6963 4 жыл бұрын
@@jobethagulan8645 Hi Jobeth, tried changing the file permission to 400, but still, I'm getting the same error as below Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
@meghamohan799
@meghamohan799 2 жыл бұрын
Thankyou
@pidugunagendra8683
@pidugunagendra8683 2 жыл бұрын
Hi madam will you help me how to provisioning afp2pdf automation server in aws
@shivananduppar1130
@shivananduppar1130 3 жыл бұрын
How to change the private key? If it's exposed to somebody. Can you explain it for us?
@harshith8227
@harshith8227 4 жыл бұрын
Is there any direct way to connect our second instance with the same keypair as first without using that command ??
@NamrataHShah
@NamrataHShah 4 жыл бұрын
not sure
@arpangupta2162
@arpangupta2162 2 жыл бұрын
why targetlinuxec2 machine doesn't have public ip address
@bodob280
@bodob280 4 жыл бұрын
thank you
@ashrafshaik8051
@ashrafshaik8051 3 жыл бұрын
Hi Madam could you please explain using git bash also.. with out pemfile
@NamrataHShah
@NamrataHShah 3 жыл бұрын
will try
@vipinm655
@vipinm655 2 жыл бұрын
MAM,I TRIED TO SSH,BUT ALL TIME IT ASKING FOR PASSPHRASE KEY EVEN I DONT ADDED THE PASSPHRASE ,KINDLY HELP ME
@dhruvsahu726
@dhruvsahu726 4 жыл бұрын
It's great
@sujalmitra5328
@sujalmitra5328 4 жыл бұрын
Please share the process to change the permission of the pem file
@NamrataHShah
@NamrataHShah 4 жыл бұрын
on linux it is a command --> chmod
@ShahidulIslamShubo
@ShahidulIslamShubo 5 жыл бұрын
hlw i got a problem there are show this message Enter passphrase for key 'newfile': how can i get the passphrase for key Please help me
@phaniindra6040
@phaniindra6040 5 жыл бұрын
so after doing this can I add these servers into our ansible hosts inventory and run playbook to install any application ?
@NamrataHShah
@NamrataHShah 5 жыл бұрын
You will need to add the code to login as a part of your script.
@MuhammadFadhil-wq2te
@MuhammadFadhil-wq2te 5 жыл бұрын
yes you can, simply edit /etc/ansible/hosts [Group-Name] ansible_user= ansible_ssh_private_key_file=
@Techvlogs852
@Techvlogs852 5 жыл бұрын
can you make video on aws route53
@NamrataHShah
@NamrataHShah 5 жыл бұрын
Will try ... I don't have a registered domain name.
@jpnaidu1
@jpnaidu1 3 жыл бұрын
Here we are able to connect to Private ip and what what about if we need to connect to public ip?
@jpnaidu1
@jpnaidu1 3 жыл бұрын
I got answer thx
@anubhavs103
@anubhavs103 2 жыл бұрын
@@jpnaidu1 how bro am connecting through public ip and throwing the error permission denied
@TheSimpleUrbanLife
@TheSimpleUrbanLife 4 жыл бұрын
Hello Namrata! I did follow the steps and when I try to do ssh from my master with client private IP, it asks me for the password of the client and I don't remember it. Can you please help me with that?
@NamrataHShah
@NamrataHShah 4 жыл бұрын
I don't know your password.
@mohdazhar1787
@mohdazhar1787 4 жыл бұрын
in nano editor of linux instance pem key is not pasting from notepad how to paste it commands ctrl +v is not working in nano
@NamrataHShah
@NamrataHShah 4 жыл бұрын
Hit enter or Ctrl U ... Ctrl V is for windows
@Krishiv11
@Krishiv11 4 жыл бұрын
how to do SSH if both instance having different "Key pair"- file name ?
@NamrataHShah
@NamrataHShah 4 жыл бұрын
Name does not matter as long as the key pair is the same
@nihalshetty6073
@nihalshetty6073 5 жыл бұрын
I am getting connection timeout error when I try to do the same.I did change the permission of the file as well ,but still getting the same error.Kindly suggest
@NamrataHShah
@NamrataHShah 5 жыл бұрын
It is facing issues to connect .. check IP, credentials, security group settings esp. port 22 should be open and the source security group (if different) should have access and check your key.
@rashmiraoraghavendra105
@rashmiraoraghavendra105 4 жыл бұрын
Hi Nihal I also faced the same error. Were you able to fix it? If Yes, Can you please let me know what was the issue?
@niteshchidrawar6553
@niteshchidrawar6553 4 жыл бұрын
permission denied (publickey gssapi-keyex gssapi-with-mic) i tried everything but got this error
@cragdoo71
@cragdoo71 4 жыл бұрын
chmod 600
@AmCoolBuddy
@AmCoolBuddy 5 жыл бұрын
well. it is working as normal user. But, it is refusing when i am trying as root user error like "Please login as the user "ec2-user" rather than the user "root" " Can you help me please ?
@NamrataHShah
@NamrataHShah 5 жыл бұрын
To login into ec2 you need to use ec2-user that is the default. You can switch to the root user after you have successfully logged in and need to perform activities of a root user.
@AmCoolBuddy
@AmCoolBuddy 5 жыл бұрын
@@NamrataHShah @NamrataHShah Thank you for your reply. I have copied the root pub key in the target node and enable public key access then it works. Actually l am setupin chef infra. So it's required direct root acces to deploy a cookbook. Now its fixed. Really I would like to apprentice your video. It was very useful in the beginnings.
@kingstanm8671
@kingstanm8671 5 жыл бұрын
btw, how for passcode less authentication between two amz ec2? please explain.
@NamrataHShah
@NamrataHShah 5 жыл бұрын
Kindly elaborate more
@kingstanm8671
@kingstanm8671 5 жыл бұрын
@@NamrataHShah If i need passcode less ssh session between two ec2 (for ansible yaml to work) how i can proceed? please assist. i just copied the pub key to the authorised key file and it worked. I want to know if any more methods are there? peace
@baludev3242
@baludev3242 5 жыл бұрын
I'm unable to connect, I don't know why .. I followed your steps .. still not able to connect
@NamrataHShah
@NamrataHShah 5 жыл бұрын
Debug it … You might have missed something
@abhishekbhandari6477
@abhishekbhandari6477 5 жыл бұрын
hi there . When i do this it is asking me for the passphrase?????
@NamrataHShah
@NamrataHShah 5 жыл бұрын
If you create your key with passphrase then you will need to provide it. See if you create a key without the passphrase.
@abhishekbhandari6477
@abhishekbhandari6477 5 жыл бұрын
I got it the pem file was corrupted. I.e it was not copied properly
@dhruvsahu726
@dhruvsahu726 4 жыл бұрын
You are a problem solver please post your coarse on udemy of aws
@darabahmadkhan7250
@darabahmadkhan7250 4 жыл бұрын
Mam your voice is not clearly audible plss be bit loud that we can understand words more clearly
@NamrataHShah
@NamrataHShah 4 жыл бұрын
I believe the voice is loud and clear. Try and increase your volume.
SPILLED CHOCKY MILK PRANK ON BROTHER 😂 #shorts
00:12
Savage Vlogs
Рет қаралды 47 МЛН
Harley Quinn's revenge plan!!!#Harley Quinn #joker
00:59
Harley Quinn with the Joker
Рет қаралды 25 МЛН
How to SSH from One Linux EC2 to another
6:33
Unus AWS
Рет қаралды 4,5 М.
Connect to AWS EC2 instance | SSH from Windows | .PEM Key
10:31
JasCloudTech
Рет қаралды 90 М.
How to SSH into Amazon EC2 Machine | SSH AWS EC2
10:27
Piyush Garg
Рет қаралды 15 М.
AWS - Public & Private EC2 Instances | NACL Rules & Priority | NAT Gateway
14:17
knowledgeindia - LearnCloud
Рет қаралды 76 М.
SPILLED CHOCKY MILK PRANK ON BROTHER 😂 #shorts
00:12
Savage Vlogs
Рет қаралды 47 МЛН