I mean i was loged out as root user and become normal use. I didn't really go to my remote machine. but I'm sending you screen shots of my cmd where i changed Insta_1.pen to 600 then try to shh -i ~/.ssh/Insta_1.pem ubuntu@publicIP and it did the same thing as last time. Logged out of super user and vanished my .pen file. I really have no idea what's happening. please tell me what exactly happening, i'm doing something wrong ?
Thanx You're really helping me so much. On Mon, Aug 13, 2018 at 5:16 PM, Karl Auer <[email protected]> wrote: > Look carefully at the pictures you sent me. They show, very clearly, that > you have successfully logged into 18.222.132.35. > > The reason you think things are "gone" is because those things exist on > your source system, not on your target system. > > From the command prompt "ubuntu@ip-172-31-23-215" type "exit" and press > return. You will find yourself back on your source system, and the > "missing" items will be there. They never left - you did :-) > > Regards, K. > > > On Mon, Aug 13, 2018 at 9:30 PM, Kiran Sonawane < > [email protected]> wrote: > >> I already did that all changes, made the path on same line. Then I >> changed permissions to from 777 to 666 >> Then I again changed to 400. Nothing worked. I just don't understand >> what's happening? >> All the files from /.ssh are gone. Id_rsa, Id_rsa.pub, my .pem file >> config file all are not there when I automatically logged out of root. >> >> On Mon, Aug 13, 2018, 4:18 PM Karl Auer <[email protected]> wrote: >> >>> Hullo again. >>> >>> Configuration files need to be copied exactly and accurately. Look at >>> the config file you sent - it does not match the formatting I sent, unless >>> email screwed it up. Each line - Host, Hostname, User and IdentityFile, >>> must be on a separate line. The value for each keyword should be on the >>> same line as the keyword, separated from it by a space. It looks to me as >>> if the IdentityFile line has a line break in it - fix that. Also - just for >>> neatness, not sure it's actually necessary - indent the three lines after >>> the Host line. >>> >>> Now on to your login: It looks to me as if it worked. You have >>> successfully logged in to 18.222.132.35. >>> >>> I suggest you correct the permissions on Insta_1.pem (use 600 instead of >>> 400, but as you can see it works either way with sudo, because root can >>> read anything). >>> >>> What files are you saying are "all gone"? Gone from where? >>> >>> Regards, K. >>> >>> >>> On Mon, Aug 13, 2018 at 8:25 PM, Kiran Sonawane < >>> [email protected]> wrote: >>> >>>> I just tried what you said and it just forced log out of Superuser then >>>> all the copied .pem file and id_rsa.pub key all are gone It's been a week >>>> I'm only trying to ssh from one instance to another now its seems it's not >>>> that worth of time. I'm sanding you screen shot. thanx >>>> >>>> On Mon, Aug 13, 2018 at 3:41 PM, Karl Auer <[email protected]> >>>> wrote: >>>> >>>>> Test the connection first using this command: >>>>> >>>>> ssh -i ~/.ssh/keyfile.pem [email protected] >>>>> >>>>> If that works, then the "User" is ubuntu, the "HostName" is >>>>> 18.191.217.98, and the "IdentityFile" is "~/.ssh/keyfile.pem". >>>>> >>>>> If you are concerned about the pem-file location, give the fully >>>>> qualified path to it. By the way, the permissions MUST BE CORRECT on the >>>>> .pem file, or ssh will not use it. Also, be careful with spaces in the >>>>> config file. Each keyword is followed by a space, then a value. >>>>> >>>>> Is the target system, i.e., the system you are trying to connect TO, >>>>> an Ubuntu Linux system? >>>>> Also, if you are using a command-line ssh, please add the argument >>>>> "-vvv" and post the output here. Like this: >>>>> >>>>> ssh -vvv -i ~/.ssh/keyfile.pem [email protected] >>>>> >>>>> Regards, K. >>>>> >>>>> On Mon, Aug 13, 2018 at 7:54 PM, Kiran Sonawane < >>>>> [email protected]> wrote: >>>>> >>>>>> should I mention any path for IdentityFile ? >>>>>> >>>>>> On Mon, Aug 13, 2018 at 2:45 PM, Kiran Sonawane < >>>>>> [email protected]> wrote: >>>>>> >>>>>>> i created config file in .ssh folder but now i'm getting error >>>>>>> >>>>>>> /root/.ssh/config line 4: Missing argument. >>>>>>> >>>>>>> I'm sending you config files cat screen shot and error screen shot >>>>>>> >>>>>>> >>>>>>> thanx in advance >>>>>>> >>>>>>> On Mon, Aug 13, 2018 at 1:59 PM, Karl Auer <[email protected]> >>>>>>> wrote: >>>>>>> >>>>>>>> I didn't notice your attachment, sorry. >>>>>>>> >>>>>>>> The attachment indicates that you are not specifying the private >>>>>>>> key! >>>>>>>> >>>>>>>> Copy the key (that you downloaded when you created the instance) >>>>>>>> into ~/.ssh. Set it's permissions to "-rw-------": >>>>>>>> >>>>>>>> cp /path/to/downloaded/keyfile.pem ~/.ssh >>>>>>>> chmod u=rw,go= ~/.ssh/keyfile.pem >>>>>>>> Then specify the key when connecting: >>>>>>>> >>>>>>>> ssh -i ~/.ssh/keyfile.pem [email protected] >>>>>>>> >>>>>>>> You can make life simpler by creating a file called ~/.ssh/config >>>>>>>> and putting this in it: >>>>>>>> >>>>>>>> Host myhost >>>>>>>> HostName 18.191.217.98 >>>>>>>> User ubuntu >>>>>>>> IdentityFile ~/.ssh/keyfile.pem >>>>>>>> >>>>>>>> Then you can just say: >>>>>>>> >>>>>>>> ssh myhost >>>>>>>> >>>>>>>> Obviously replace "myhost" with whatever name you prefer, and " >>>>>>>> keyfile.pem" with the actual name of the private key file. >>>>>>>> >>>>>>>> Setting up putty takes longer, partly because you have to convert >>>>>>>> the private key, but once set up it's just point and click to connect. >>>>>>>> >>>>>>>> Regards, K. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Mon, Aug 13, 2018 at 5:09 PM, Kiran Sonawane < >>>>>>>> [email protected]> wrote: >>>>>>>> >>>>>>>>> now I tried connection ec2 instance from putty. then i followed >>>>>>>>> all the steps in all videos on youtube its giving the following error. >>>>>>>>> >>>>>>>>> (ECDSA) to the list of known hosts. >>>>>>>>> Permission denied (publickey). >>>>>>>>> >>>>>>>>> >>>>>>>>> On Mon, Aug 13, 2018 at 11:46 AM, Jonathan Lozada De La Matta < >>>>>>>>> [email protected]> wrote: >>>>>>>>> >>>>>>>>>> Kiran, >>>>>>>>>> >>>>>>>>>> Your issue seems to be more an issue about connecting right to >>>>>>>>>> the aws vm than ansible. Did you create the keys, downloaded them, >>>>>>>>>> ssh-add >>>>>>>>>> and connecting as the right user? are you using -K and escalating >>>>>>>>>> correctly? >>>>>>>>>> >>>>>>>>>> On Mon, Aug 13, 2018 at 2:03 AM Kiran Sonawane < >>>>>>>>>> [email protected]> wrote: >>>>>>>>>> >>>>>>>>>>> I have free account so only default instances can be created but >>>>>>>>>>> I changed Root Password To Root before starting so there should not >>>>>>>>>>> be >>>>>>>>>>> permission issue but it gives me an permission issue. >>>>>>>>>>> >>>>>>>>>>> On Sunday, August 12, 2018 at 9:39:08 PM UTC+5:30, Sakthivel G >>>>>>>>>>> wrote: >>>>>>>>>>>> >>>>>>>>>>>> Hi, >>>>>>>>>>>> >>>>>>>>>>>> /dev/sda is reserved for root. >>>>>>>>>>>> >>>>>>>>>>>> Please try below... >>>>>>>>>>>> >>>>>>>>>>>> # Single instance with ssd gp2 root volume >>>>>>>>>>>> - ec2: >>>>>>>>>>>> key_name: mykey >>>>>>>>>>>> group: webserver >>>>>>>>>>>> instance_type: c3.medium >>>>>>>>>>>> image: ami-123456 >>>>>>>>>>>> wait: yes >>>>>>>>>>>> wait_timeout: 500 >>>>>>>>>>>> volumes: >>>>>>>>>>>> - device_name: /dev/xvda >>>>>>>>>>>> volume_type: gp2 >>>>>>>>>>>> volume_size: 8 >>>>>>>>>>>> vpc_subnet_id: subnet-29e63245 >>>>>>>>>>>> assign_public_ip: yes >>>>>>>>>>>> count_tag: >>>>>>>>>>>> Name: dbserver >>>>>>>>>>>> exact_count: 1 >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> On Sun 12 Aug, 2018, 6:27 AM Bruce Affonso, < >>>>>>>>>>>> [email protected]> wrote: >>>>>>>>>>>> >>>>>>>>>>>>> I am trying to use the ec2_instance module to create an ec2 >>>>>>>>>>>>> instance. When using the ec2 module to configure a volume one >>>>>>>>>>>>> would do >>>>>>>>>>>>> something like this: >>>>>>>>>>>>> >>>>>>>>>>>>> volumes: >>>>>>>>>>>>> - device_name: /dev/sda1 >>>>>>>>>>>>> volume_type: gp2 >>>>>>>>>>>>> volume_size: 50 >>>>>>>>>>>>> >>>>>>>>>>>>> With ec2_instance I am not sure how to set the values. >>>>>>>>>>>>> >>>>>>>>>>>>> In the description it says: >>>>>>>>>>>>> >>>>>>>>>>>>> A list of block device mappings, by default this will always >>>>>>>>>>>>> use the AMI root device so the volumes option is primarily for >>>>>>>>>>>>> adding more >>>>>>>>>>>>> storage. >>>>>>>>>>>>> A mapping contains the (optional) keys device_name, >>>>>>>>>>>>> virtual_name, ebs.device_type, ebs.device_size, ebs.kms_key_id, >>>>>>>>>>>>> ebs.iops, >>>>>>>>>>>>> and ebs.delete_on_termination. >>>>>>>>>>>>> >>>>>>>>>>>>> Please let me know how I would set the info from above example >>>>>>>>>>>>> using the ec2_instance module. >>>>>>>>>>>>> >>>>>>>>>>>>> Thank you >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> You received this message because you are subscribed to the >>>>>>>>>>>>> Google Groups "Ansible Project" group. >>>>>>>>>>>>> To unsubscribe from this group and stop receiving emails from >>>>>>>>>>>>> it, send an email to [email protected]. >>>>>>>>>>>>> To post to this group, send email to >>>>>>>>>>>>> [email protected]. >>>>>>>>>>>>> To view this discussion on the web visit >>>>>>>>>>>>> https://groups.google.com/d/msgid/ansible-project/82ba8db3- >>>>>>>>>>>>> ed16-4230-9eaa-743a74fbebe0%40googlegroups.com >>>>>>>>>>>>> <https://groups.google.com/d/msgid/ansible-project/82ba8db3-ed16-4230-9eaa-743a74fbebe0%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>>>>>>>>> . >>>>>>>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>> You received this message because you are subscribed to the >>>>>>>>>>> Google Groups "Ansible Project" group. >>>>>>>>>>> To unsubscribe from this group and stop receiving emails from >>>>>>>>>>> it, send an email to ansible-project+unsubscribe@go >>>>>>>>>>> oglegroups.com. >>>>>>>>>>> To post to this group, send email to >>>>>>>>>>> [email protected]. >>>>>>>>>>> To view this discussion on the web visit >>>>>>>>>>> https://groups.google.com/d/msgid/ansible-project/9bf3dfbc- >>>>>>>>>>> bf18-4b5d-9e78-b6caa75d113b%40googlegroups.com >>>>>>>>>>> <https://groups.google.com/d/msgid/ansible-project/9bf3dfbc-bf18-4b5d-9e78-b6caa75d113b%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>>>>>>>> . >>>>>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> >>>>>>>>>> Jonathan lozada de la matta >>>>>>>>>> >>>>>>>>>> AUTOMATION CONSULTANT - AUTOMATION PRACTICE >>>>>>>>>> >>>>>>>>>> Red Hat Consulting Services <https://www.redhat.com/> >>>>>>>>>> >>>>>>>>>> [email protected] >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> You received this message because you are subscribed to the >>>>>>>>>> Google Groups "Ansible Project" group. >>>>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>>>> send an email to [email protected]. >>>>>>>>>> To post to this group, send email to >>>>>>>>>> [email protected]. >>>>>>>>>> To view this discussion on the web visit >>>>>>>>>> https://groups.google.com/d/msgid/ansible-project/CAFYJA%2BK >>>>>>>>>> xO_FTk2LSEefUbO1UCBQieN7Pos1XkXtwYN8t6fY%2BSw%40mail.gmail.com >>>>>>>>>> <https://groups.google.com/d/msgid/ansible-project/CAFYJA%2BKxO_FTk2LSEefUbO1UCBQieN7Pos1XkXtwYN8t6fY%2BSw%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>>>>>>> . >>>>>>>>>> >>>>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> You received this message because you are subscribed to the Google >>>>>>>>> Groups "Ansible Project" group. >>>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>>> send an email to [email protected]. >>>>>>>>> To post to this group, send email to >>>>>>>>> [email protected]. >>>>>>>>> To view this discussion on the web visit >>>>>>>>> https://groups.google.com/d/msgid/ansible-project/CABZrV%3DZ >>>>>>>>> p5d%3D844OF-YyBvv5Un8hM2oGHzBG7CqyhxG4-Qz8Bow%40mail.gmail.com >>>>>>>>> <https://groups.google.com/d/msgid/ansible-project/CABZrV%3DZp5d%3D844OF-YyBvv5Un8hM2oGHzBG7CqyhxG4-Qz8Bow%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>>>>>> . >>>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> Karl Auer >>>>>>>> >>>>>>>> Email : [email protected] >>>>>>>> Website: http://2pisoftware.com >>>>>>>> >>>>>>>> GPG/PGP : 958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816 >>>>>>>> Previous: F0AB 6C70 A49D 1927 6E05 81E7 AD95 268F 2AB6 40EA >>>>>>>> >>>>>>>> -- >>>>>>>> You received this message because you are subscribed to the Google >>>>>>>> Groups "Ansible Project" group. >>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>> send an email to [email protected]. >>>>>>>> To post to this group, send email to [email protected] >>>>>>>> om. >>>>>>>> To view this discussion on the web visit >>>>>>>> https://groups.google.com/d/msgid/ansible-project/CA%2B%2BT0 >>>>>>>> 8QUnrcyo9%2BbWqzsAjK%3DpvH4YQVE8KE6U-a%2BfvBmWuhYjA%40mail. >>>>>>>> gmail.com >>>>>>>> <https://groups.google.com/d/msgid/ansible-project/CA%2B%2BT08QUnrcyo9%2BbWqzsAjK%3DpvH4YQVE8KE6U-a%2BfvBmWuhYjA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>>>>> . >>>>>>>> >>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>> >>>>>>> >>>>>>> >>>>>> -- >>>>>> You received this message because you are subscribed to the Google >>>>>> Groups "Ansible Project" group. >>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>> send an email to [email protected]. >>>>>> To post to this group, send email to [email protected] >>>>>> . >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msgid/ansible-project/CABZrV%3Db >>>>>> 2dWLkXBOtRNyj0d8mXzznQ_7Kftn0NkVkdNBS3jUesQ%40mail.gmail.com >>>>>> <https://groups.google.com/d/msgid/ansible-project/CABZrV%3Db2dWLkXBOtRNyj0d8mXzznQ_7Kftn0NkVkdNBS3jUesQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>>> . >>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Karl Auer >>>>> >>>>> Email : [email protected] >>>>> Website: http://2pisoftware.com >>>>> >>>>> GPG/PGP : 958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816 >>>>> Previous: F0AB 6C70 A49D 1927 6E05 81E7 AD95 268F 2AB6 40EA >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Ansible Project" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected]. >>>>> To post to this group, send email to [email protected]. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/ansible-project/CA%2B%2BT0 >>>>> 8TSNssJW9dazjNMRt-_Dz8U8h1Hwj_KS%3DXEaZMBkzbZWA%40mail.gmail.com >>>>> <https://groups.google.com/d/msgid/ansible-project/CA%2B%2BT08TSNssJW9dazjNMRt-_Dz8U8h1Hwj_KS%3DXEaZMBkzbZWA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Ansible Project" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To post to this group, send email to [email protected]. >>>> To view this discussion on the web visit https://groups.google.com/d/ms >>>> gid/ansible-project/CABZrV%3Da6h%2B_LHJ_PMqd865iFVieGimWemMW >>>> %2BX6A5p0CxTb6zNQ%40mail.gmail.com >>>> <https://groups.google.com/d/msgid/ansible-project/CABZrV%3Da6h%2B_LHJ_PMqd865iFVieGimWemMW%2BX6A5p0CxTb6zNQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >>>> . >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >>> >>> -- >>> Karl Auer >>> >>> Email : [email protected] >>> Website: http://2pisoftware.com >>> >>> GPG/PGP : 958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816 >>> Previous: F0AB 6C70 A49D 1927 6E05 81E7 AD95 268F 2AB6 40EA >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Ansible Project" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> To view this discussion on the web visit https://groups.google.com/d/ms >>> gid/ansible-project/CA%2B%2BT08SUU_7f0%3DU2mh%3Dje%2BKNO_ >>> FApTURS%2B76m1%2Bm6nCogDy-UA%40mail.gmail.com >>> <https://groups.google.com/d/msgid/ansible-project/CA%2B%2BT08SUU_7f0%3DU2mh%3Dje%2BKNO_FApTURS%2B76m1%2Bm6nCogDy-UA%40mail.gmail.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ansible Project" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To post to this group, send email to [email protected]. >> To view this discussion on the web visit https://groups.google.com/d/ms >> gid/ansible-project/CABZrV%3DbrFMat_%2B1mHXNk7%3DuvRPtG8KB2X >> nFs_P4UmyuKb6m_Rg%40mail.gmail.com >> <https://groups.google.com/d/msgid/ansible-project/CABZrV%3DbrFMat_%2B1mHXNk7%3DuvRPtG8KB2XnFs_P4UmyuKb6m_Rg%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Karl Auer > > Email : [email protected] > Website: http://2pisoftware.com > > GPG/PGP : 958A 2647 6C44 D376 3D63 86A5 FFB2 20BC 0257 5816 > Previous: F0AB 6C70 A49D 1927 6E05 81E7 AD95 268F 2AB6 40EA > > -- > You received this message because you are subscribed to the Google Groups > "Ansible Project" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/ansible-project/CA%2B%2BT08SmOkkzLZa3zHOcYZuK1806tTx > q9W5QFo0cXOaHxtn6MQ%40mail.gmail.com > <https://groups.google.com/d/msgid/ansible-project/CA%2B%2BT08SmOkkzLZa3zHOcYZuK1806tTxq9W5QFo0cXOaHxtn6MQ%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CABZrV%3DaA_i3etry35728O8%2B-AeLB3Fwuvn25WH2qoT_Hnt_b%3Dg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
