/l3/users/slm/2018-12-minsk-aws/student03.BigClassRoom/user :1 :2 :3 :4 :5 :6 :7 |
|
$ls -la .ssh/
total 28 drwx------ 2 user user 4096 Dec 19 10:45 . drwxr-xr-x 20 user user 4096 Dec 19 10:59 .. -rw-r--r-- 1 user user 167 Dec 18 12:59 config -rw------- 1 user user 1766 Dec 19 10:45 id_rsa -rw-r--r-- 1 user user 389 Dec 19 10:45 id_rsa.pub -rw-r--r-- 1 user user 1554 Dec 19 10:54 known_hosts -rw------- 1 user user 1692 Dec 18 12:49 user3.pem |
$ls -la .ssh/
total 28 drwx------ 2 user user 4096 Dec 19 10:45 . drwxr-xr-x 20 user user 4096 Dec 19 10:59 .. -rw-r--r-- 1 user user 167 Dec 18 12:59 config -rw------- 1 user user 1766 Dec 19 10:45 id_rsa -rw-r--r-- 1 user user 389 Dec 19 10:45 id_rsa.pub -rw-r--r-- 1 user user 1554 Dec 19 10:54 known_hosts -rw------- 1 user user 1692 Dec 18 12:49 user3.pem |
$ls -la .ssh/
total 28 drwx------ 2 user user 4096 Dec 19 10:45 . drwxr-xr-x 20 user user 4096 Dec 19 10:59 .. -rw-r--r-- 1 user user 167 Dec 18 12:59 config -rw------- 1 user user 1766 Dec 19 10:45 id_rsa -rw-r--r-- 1 user user 389 Dec 19 10:45 id_rsa.pub -rw-r--r-- 1 user user 1554 Dec 19 10:54 known_hosts -rw------- 1 user user 1692 Dec 18 12:49 user3.pem |
$ls -la .ssh/
total 32 drwx------ 2 user user 4096 Dec 19 11:01 . drwxr-xr-x 20 user user 4096 Dec 19 10:59 .. -rw-r--r-- 1 user user 167 Dec 18 12:59 config -rw------- 1 user user 1766 Dec 19 10:45 id_rsa -rw-r--r-- 1 user user 389 Dec 19 10:45 id_rsa.pub -rw-r--r-- 1 user user 1554 Dec 19 10:54 known_hosts -rw-r--r-- 1 user user 389 Dec 19 11:01 m2_id_rsa.pub -rw------- 1 user user 1692 Dec 18 12:49 user3.pem |
$scp .ssh/id_rsa.pub m2:~.ssh/m3_id_rsa.pub
![]() user@m2's password: scp: ~.ssh/m3_id_rsa.pub: No such file or directory |
$scp .ssh/id_rsa.pub m2:~/.ssh/m3_id_rsa.pub
user@m2's password: id_rsa.pub 100% 389 1.0MB/s 00:00 |
$ssh m2
![]() user@m2's password: Linux m2 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed Dec 19 10:56:19 2018 from 172.20.13.183 l3-agent is already running: pid=1894; pidfile=/home/user/.lilalo/l3-agent.pid user@m2:~$ ls -la ... -rw-r--r-- 1 user user 675 May 15 2017 .profile drwxr-xr-x 2 user user 4096 Dec 17 12:15 Public drwx------ 2 user user 4096 Dec 19 11:04 .ssh drwxr-xr-x 2 user user 4096 Dec 17 12:15 Templates drwxr-xr-x 2 user user 4096 Dec 17 12:15 Videos -rw------- 1 user user 7457 Dec 18 12:59 .viminfo user@m2:~$ screen -x There is no screen to be attached. user@m2:~$ logout Connection to m2 closed. |
$vi Readme.txt
|
$more Readme.txt
|
$cat .ssh/m2_id_rsa.pub | ssh ec2-18-202-250-151.eu-west-1.compute.amazonaws.com 'cat >> ~/.ssh/authorized_keys'
The authenticity of host 'ec2-18-202-250-151.eu-west-1.compute.amazonaws.com (18.202.250.151)' can't be established. ECDSA key fingerprint is SHA256:n74nJdPD3sIdmafbsw0i2Nd8Op1YcMiqyP7Uwd5Z1So. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ec2-18-202-250-151.eu-west-1.compute.amazonaws.com,18.202.250.151' (ECDSA) to the list of known hosts. |
$ssh ec2-18-202-250-151.eu-west-1.compute.amazonaws.com
Last login: Wed Dec 19 08:27:19 2018 from port-90-adslby-pool35.infonet.by __| __|_ ) _| ( / Amazon Linux 2 AMI ___|\___|___| https://aws.amazon.com/amazon-linux-2/ 15 package(s) needed for security, out of 16 available Run "sudo yum update" to apply all updates. [ec2-user@ip-10-1-1-153 ~]$ logout Connection to ec2-18-202-250-151.eu-west-1.compute.amazonaws.com closed. |
$ssh-add .ssg/
![]() .ssg/: No such file or directory |
$ssh-add .ssh/
![]() Error loading key ".ssh/": Is a directory |
$ls -la
total 55552 drwxr-xr-x 20 user user 4096 Dec 19 11:18 . drwxr-xr-x 4 root root 4096 Dec 16 14:01 .. drwxr-xr-x 3 user user 4096 Dec 17 16:45 AWS -rw------- 1 user user 5201 Dec 19 11:13 .bash_history -rw-r--r-- 1 user user 220 May 15 2017 .bash_logout -rw-r--r-- 1 user root 10 Dec 16 14:23 .bash_profile -rw-r--r-- 1 user user 636 Dec 17 12:41 .bashrc drwx------ 9 user user 4096 Dec 18 11:47 .cache drwx------ 12 user user 4096 Dec 18 11:47 .config ... drwx------ 3 user user 4096 Dec 18 11:47 .pki -rw-r--r-- 1 user user 675 May 15 2017 .profile drwxr-xr-x 2 user user 4096 Dec 17 12:15 Public -rw-r--r-- 1 user user 108 Dec 19 11:06 Readme.txt drwx------ 2 user user 4096 Dec 19 11:01 .ssh -rw------- 1 user user 12288 Dec 19 11:19 .tatyanaDNS.txt.swp drwxr-xr-x 2 user user 4096 Dec 17 12:15 Templates drwxr-xr-x 2 user user 4096 Dec 17 12:15 Videos -rw------- 1 user user 7975 Dec 19 11:06 .viminfo -rw-r--r-- 1 user user 103 Dec 17 14:43 V.json |
$ssh-add .ssh/
![]() config id_rsa id_rsa.pub known_hosts m2_id_rsa.pub user3.pem |
$ssh-add .ssh/m2_id_rsa.pub
![]() @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0644 for '.ssh/m2_id_rsa.pub' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. |
$ssh-add .ssh/user3.pem
Identity added: .ssh/user3.pem (.ssh/user3.pem) |
$ssh ec2-34-245-27-59.eu-west-1.compute.amazonaws.com
![]() The authenticity of host 'ec2-34-245-27-59.eu-west-1.compute.amazonaws.com (34.245.27.59)' can't be established. ECDSA key fingerprint is SHA256:IDNPRyB+tM8afeL+WgI0sDCRMPecpxb9/bF1FXvOZgo. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ec2-34-245-27-59.eu-west-1.compute.amazonaws.com,34.245.27.59' (ECDSA) to the list of known hosts. Permission denied (publickey,gssapi-keyex,gssapi-with-mic). |
$ssh ec2-34-245-27-59.eu-west-1.compute.amazonaws.com
![]() Permission denied (publickey,gssapi-keyex,gssapi-with-mic). |
$ssh ec2-18-202-250-151.eu-west-1.compute.amazonaws.com
Last login: Wed Dec 19 08:19:05 2018 from port-90-adslby-pool35.infonet.by __| __|_ ) _| ( / Amazon Linux 2 AMI ___|\___|___| https://aws.amazon.com/amazon-linux-2/ 15 package(s) needed for security, out of 16 available Run "sudo yum update" to apply all updates. [ec2-user@ip-10-1-1-153 ~]$ [ec2-user@ip-10-1-1-153 ~]$ [ec2-user@ip-10-1-1-153 ~]$ ssh -A ec2-18-202-250-151.eu-west-1.compute.amazonaws.com ... lsof 31640 ec2-user mem REG 259,3 155680 42249 /usr/lib64/libselinux.so.1 lsof 31640 ec2-user mem REG 259,3 178792 42164 /usr/lib64/ld-2.26.so lsof 31640 ec2-user 4r FIFO 0,11 0t0 58416 pipe lsof 31640 ec2-user 7w FIFO 0,11 0t0 58417 pipe [ec2-user@ip-10-1-1-153 ~]$ export | grep SSH declare -x SSH_CLIENT="81.25.35.90 11121 22" declare -x SSH_CONNECTION="81.25.35.90 11121 10.1.1.153 22" declare -x SSH_TTY="/dev/pts/0" [ec2-user@ip-10-1-1-153 ~]$ logout Connection to ec2-18-202-250-151.eu-west-1.compute.amazonaws.com closed. |
$vi .ssh/config
|
$ssh -v ec2-34-245-27-59.eu-west-1.compute.amazonaws.com
OpenSSH_7.4p1 Debian-10+deb9u4, OpenSSL 1.0.2l 25 May 2017 debug1: Reading configuration data /home/user/.ssh/config debug1: /home/user/.ssh/config line 1: Applying options for *.compute.amazonaws.com debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug1: Connecting to ec2-34-245-27-59.eu-west-1.compute.amazonaws.com [34.245.27.59] port 22. debug1: Connection established. debug1: identity file /home/user/.ssh/id_rsa type 1 debug1: key_load_public: No such file or directory debug1: identity file /home/user/.ssh/id_rsa-cert type -1 ... 15 package(s) needed for security, out of 16 available Run "sudo yum update" to apply all updates. [ec2-user@ip-10-1-1-132 ~]$ debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0 logout debug1: channel 0: free: client-session, nchannels 1 Connection to ec2-34-245-27-59.eu-west-1.compute.amazonaws.com closed. Transferred: sent 3136, received 3332 bytes, in 24.8 seconds Bytes per second: sent 126.4, received 134.3 debug1: Exit status 0 |
$ssh ec2-54-154-147-70.eu-west-1.compute.amazonaws.com
The authenticity of host 'ec2-54-154-147-70.eu-west-1.compute.amazonaws.com (54.154.147.70)' can't be established. ECDSA key fingerprint is SHA256:UKIYw2j8TBqQ53DwvQow+9TnKJh3vgXLDeY1pTATt70. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ec2-54-154-147-70.eu-west-1.compute.amazonaws.com,54.154.147.70' (ECDSA) to the list of known hosts. __| __|_ ) _| ( / Amazon Linux 2 AMI ___|\___|___| https://aws.amazon.com/amazon-linux-2/ [ec2-user@ip-10-1-1-105 ~]$ logout Connection to ec2-54-154-147-70.eu-west-1.compute.amazonaws.com closed. |
$history | grep cat
58 cat github.txt 124 cat config 155 wget http://ftp.br.debian.org/debian/pool/main/liba/libappindicator/libappindicator3-1_0.4.92-4_i386.deb 156 dpkg -i libappindicator3-1_0.4.92-4_i386.deb 157 sudo dpkg -i libappindicator3-1_0.4.92-4_i386.deb 158 wget http://ftp.br.debian.org/debian/pool/main/liba/libappindicator/libappindicator3-1_0.4.92-4_amd64.deb 159 dpkg -i libappindicator3-1_0.4.92-4_amd64.deb 160 sudo dpkg -i libappindicator3-1_0.4.92-4_amd64.deb 166 sudo dpkg -i libappindicator3-1_0.4.92-4_amd64.deb 170 sudo dpkg -i libappindicator3-1_0.4.92-4_amd64.deb 172 sudo dpkg -i libindicator3-7_0.5.0-3+b1_amd64.deb 174 sudo dpkg -i libappindicator3-1_0.4.92-4_amd64.deb 237 cat .ssh/m2_id_rsa.pub | ssh ec2-18-202-250-151.eu-west-1.compute.amazonaws.com 'cat >> ~/.ssh/authorized_keys' 258 history | grep cat |
$ssh ec2-54-154-147-70.eu-west-1.compute.amazonaws.com
![]() Permission denied (publickey,gssapi-keyex,gssapi-with-mic). |
$ssh ec2-18-202-250-151.eu-west-1.compute.amazonaws.com
![]() Last login: Wed Dec 19 08:58:32 2018 from port-90-adslby-pool35.infonet.by __| __|_ ) _| ( / Amazon Linux 2 AMI ___|\___|___| https://aws.amazon.com/amazon-linux-2/ 15 package(s) needed for security, out of 16 available Run "sudo yum update" to apply all updates. [ec2-user@ip-10-1-1-153 ~]$ sudo - sudo: -: command not found [ec2-user@ip-10-1-1-153 ~]$ sudo -s ... [ 6431.598389] pci 0000:00:1d.0: BAR 0: assigned [mem 0xc0000000-0xc0003fff] [ 6431.600893] nvme nvme3: pci function 0000:00:1d.0 [ 6431.602645] nvme 0000:00:1d.0: enabling device (0000 -> 0002) [ 6431.605238] ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 10 [ 6432.550490] nvme3n1: p1 p128 [root@ip-10-1-1-153 ec2-user]# exit [ec2-user@ip-10-1-1-153 ~]$ ssh ec2-18-202-250-151.eu-west-1.compute.amazonaws.com Permission denied (publickey,gssapi-keyex,gssapi-with-mic). [ec2-user@ip-10-1-1-153 ~]$ logout Connection to ec2-18-202-250-151.eu-west-1.compute.amazonaws.com closed. |
$ssh ec2-18-202-250-151.eu-west-1.compute.amazonaws.com
Last login: Wed Dec 19 09:26:25 2018 from port-90-adslby-pool35.infonet.by __| __|_ ) _| ( / Amazon Linux 2 AMI ___|\___|___| https://aws.amazon.com/amazon-linux-2/ 15 package(s) needed for security, out of 16 available Run "sudo yum update" to apply all updates. [ec2-user@ip-10-1-1-153 ~]$ [ec2-user@ip-10-1-1-153 ~]$ ssh ip-10-1-1-251.eu-west-1.compute.internal The authenticity of host 'ip-10-1-1-251.eu-west-1.compute.internal (10.1.1.251)' can't be established. ECDSA key fingerprint is SHA256:dDpXAJgP4U8RKSFtoM+GgDk/ddiXa+Nlnc8gmWmEr0M. ECDSA key fingerprint is MD5:cc:ef:b9:f8:0f:96:ba:e4:cf:10:45:81:2d:0c:bf:3f. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ip-10-1-1-251.eu-west-1.compute.internal,10.1.1.251' (ECDSA) to the list of known hosts. Permission denied (publickey,gssapi-keyex,gssapi-with-mic). [ec2-user@ip-10-1-1-153 ~]$ logout Connection to ec2-18-202-250-151.eu-west-1.compute.amazonaws.com closed. |
$ls -la
total 55552 drwxr-xr-x 20 user user 4096 Dec 19 11:33 . drwxr-xr-x 4 root root 4096 Dec 16 14:01 .. drwxr-xr-x 3 user user 4096 Dec 17 16:45 AWS -rw------- 1 user user 6648 Dec 19 13:58 .bash_history -rw-r--r-- 1 user user 220 May 15 2017 .bash_logout -rw-r--r-- 1 user root 10 Dec 16 14:23 .bash_profile -rw-r--r-- 1 user user 636 Dec 17 12:41 .bashrc drwx------ 9 user user 4096 Dec 18 11:47 .cache drwx------ 12 user user 4096 Dec 18 11:47 .config ... drwx------ 3 user user 4096 Dec 18 11:47 .pki -rw-r--r-- 1 user user 675 May 15 2017 .profile drwxr-xr-x 2 user user 4096 Dec 17 12:15 Public -rw-r--r-- 1 user user 108 Dec 19 11:06 Readme.txt drwx------ 2 user user 4096 Dec 19 11:33 .ssh -rw------- 1 user user 12288 Dec 19 11:19 .tatyanaDNS.txt.swp drwxr-xr-x 2 user user 4096 Dec 17 12:15 Templates drwxr-xr-x 2 user user 4096 Dec 17 12:15 Videos -rw------- 1 user user 8183 Dec 19 11:33 .viminfo -rw-r--r-- 1 user user 103 Dec 17 14:43 V.json |
$pwd
/home/user |
$s
![]() bash: s: command not found |
$l
![]() bash: l: command not found |
$l
![]() bash: l: command not found |
$ls
AWS Downloads libappindicator3-1_0.4.92-4_amd64.deb m2_id_rsa.pub Public Videos Desktop github.txt libappindicator3-1_0.4.92-4_i386.deb Music Readme.txt V.json Documents google-chrome-stable_current_amd64.deb m1_id_rsa.pub Pictures Templates |
$l
![]() bash: l: command not found |
$ls
AWS Downloads libappindicator3-1_0.4.92-4_amd64.deb m2_id_rsa.pub Public Videos Desktop github.txt libappindicator3-1_0.4.92-4_i386.deb Music Readme.txt V.json Documents google-chrome-stable_current_amd64.deb m1_id_rsa.pub Pictures Templates |
$l
![]() bash: l: command not found |
$apt-cache show awscli
Package: awscli Version: 1.11.13-1 Installed-Size: 2831 Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org> Architecture: all Depends: python3, python3-botocore (>= 1.3.9), python3-colorama, python3-docutils, python3-rsa, python3-s3transfer, python3:any (>= 3.3.2-2~) Description-en: Universal Command Line Environment for AWS This package provides a unified command line interface to many Amazon Web Services. . ... * Auto Scaling * Elastic Load Balancing Description-md5: aaf8e6b3ff4426c8a7b4d7d49df6ee53 Homepage: http://aws.amazon.com/cli/ Section: admin Priority: optional Filename: pool/main/a/awscli/awscli_1.11.13-1_all.deb Size: 403388 MD5sum: d212d89fd9effd33e8a69d322203dd08 SHA256: b74e6665f792865dee044b634c62ffc1c697f2e908f71089b301426942fc9104 |
$sudo pi
![]() pi1toppm pic2tpic pidof pilfile pinentry pinentry-x11 ping6 pi3topbm pico pilconvert pilfont pinentry-curses ping pinky pic piconv pildriver pilprint pinentry-gnome3 ping4 pivot_root |
$sudo apt-get install pip*
[sudo] password for user: Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'pipemeter' for glob 'pip*' Note, selecting 'pipelight' for glob 'pip*' Note, selecting 'pipenightdreams-data' for glob 'pip*' Note, selecting 'pipenightdreams' for glob 'pip*' Note, selecting 'pipebench' for glob 'pip*' Note, selecting 'pipexec' for glob 'pip*' Note, selecting 'pipasic' for glob 'pip*' Note, selecting 'pipewalker' for glob 'pip*' You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: gir1.2-dbusmenu-glib-0.4 : Depends: libdbusmenu-glib4 (= 12.10.2-2) but 18.10.20180917~bzr490+repack1-1 is to be installed pipenightdreams : Depends: libsdl-image1.2 (>= 1.2.10) but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). |
$sudo apt-get install python-pip
![]() Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: gir1.2-dbusmenu-glib-0.4 : Depends: libdbusmenu-glib4 (= 12.10.2-2) but 18.10.20180917~bzr490+repack1-1 is to be installed python-pip : Depends: python-pip-whl (= 9.0.1-2) but it is not going to be installed Recommends: python-all-dev (>= 2.6) but it is not going to be installed Recommends: python-wheel but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). |
$sudo apt-get python-pip
![]() E: Invalid operation python-pip |
$apt-get install python-pip
![]() E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? |
$sudo apt-get install pytho*
![]() Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'python-pyao-dbg' for glob 'pytho*' Note, selecting 'python3-doc8' for glob 'pytho*' Note, selecting 'python3-pykcs11' for glob 'pytho*' Note, selecting 'python2.6-pydhcplib' for glob 'pytho*' Note, selecting 'python-mnemonic' for glob 'pytho*' Note, selecting 'python-rsa' for glob 'pytho*' Note, selecting 'python-tf2-ros' for glob 'pytho*' ... python3.5-dbg : Depends: libpython3.5-dbg (= 3.5.3-1+deb9u1) but it is not going to be installed Recommends: gdb python3.5-dev : Depends: libpython3.5-dev (= 3.5.3-1+deb9u1) but it is not going to be installed Depends: libexpat1-dev but it is not going to be installed python3.5-doc : Depends: libjs-jquery but it is not going to be installed Depends: libjs-underscore but it is not going to be installed slapos-client : Depends: supervisor but it is not going to be installed Recommends: ipython but it is not going to be installed or bpython but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). |
$sudo apt-get install python-pip
![]() Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: gir1.2-dbusmenu-glib-0.4 : Depends: libdbusmenu-glib4 (= 12.10.2-2) but 18.10.20180917~bzr490+repack1-1 is to be installed python-pip : Depends: python-pip-whl (= 9.0.1-2) but it is not going to be installed Recommends: python-all-dev (>= 2.6) but it is not going to be installed Recommends: python-wheel but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). |
$sudo apt-get install python-pip
![]() Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: gir1.2-dbusmenu-glib-0.4 : Depends: libdbusmenu-glib4 (= 12.10.2-2) but 18.10.20180917~bzr490+repack1-1 is to be installed python-pip : Depends: python-pip-whl (= 9.0.1-2) but it is not going to be installed Recommends: python-all-dev (>= 2.6) but it is not going to be installed Recommends: python-wheel but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). |
$sudo apt-get install --fix-broken install'
![]() > exit > bash: unexpected EOF while looking for matching `'' bash: syntax error: unexpected end of file |
$sudo apt-get install --fix-broken install'
exit Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages will be REMOVED: gir1.2-dbusmenu-glib-0.4 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 94.2 kB disk space will be freed. Do you want to continue? [Y/n] (Reading database ... 137063 files and directories currently installed.) Removing gir1.2-dbusmenu-glib-0.4 (12.10.2-2) ... |
$sudo apt-get install --fix-broken install'
exit python-pip Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libexpat1-dev libpython-all-dev libpython-dev libpython2.7-dev python-all python-all-dev python-crypto python-dbus python-dev python-keyring python-keyrings.alt python-pip-whl python-secretstorage python-wheel python-xdg python2.7-dev Suggested packages: python-crypto-dbg python-crypto-doc python-dbus-dbg python-dbus-doc libkf5wallet-bin python-fs python-gdata python-kde4 python-keyczar python-secretstorage-doc ... Setting up python-pip (9.0.1-2) ... Setting up python2.7-dev (2.7.13-2+deb9u3) ... Setting up python-all (2.7.13-2) ... Setting up python-xdg (0.25-4) ... Setting up python-secretstorage (2.3.1-2) ... Setting up libpython-dev:amd64 (2.7.13-2) ... Setting up python-keyring (10.1-1) ... Setting up python-dev (2.7.13-2) ... Setting up libpython-all-dev:amd64 (2.7.13-2) ... Setting up python-all-dev (2.7.13-2) ... |
$sudo pip install awscli
Collecting awscli Downloading https://files.pythonhosted.org/packages/46/f9/9cdf9450b8fbb7f06aa1af2581dc3f261ef965185f0a45f4aaa008351e81/awscli-1.16.78-py2.py3-none-any.whl (1.4MB) 100% |████████████████████████████████| 1.4MB 354kB/s Collecting colorama<=0.3.9,>=0.2.5 (from awscli) Downloading https://files.pythonhosted.org/packages/db/c8/7dcf9dbcb22429512708fe3a547f8b6101c0d02137acbd892505aee57adf/colorama-0.3.9-py2.py3-none-any.whl Collecting rsa<=3.5.0,>=3.1.2 (from awscli) Downloading https://files.pythonhosted.org/packages/e1/ae/baedc9cb175552e95f3395c43055a6a5e125ae4d48a1d7a924baca83e92e/rsa-3.4.2-py2.py3-none-any.whl (46kB) 100% |████████████████████████████████| 51kB 429kB/s Collecting s3transfer<0.2.0,>=0.1.12 (from awscli) Downloading https://files.pythonhosted.org/packages/d7/14/2a0004d487464d120c9fb85313a75cd3d71a7506955be458eebfe19a6b1d/s3transfer-0.1.13-py2.py3-none-any.whl (59kB) 100% |████████████████████████████████| 61kB 366kB/s Collecting botocore==1.12.68 (from awscli) Downloading https://files.pythonhosted.org/packages/00/59/28cc07ee9486402d3d016314e7895b763489015a5d4a234d658022095650/botocore-1.12.68-py2.py3-none-any.whl (5.2MB) |
$aws version
![]() usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters] To see help text, you can run: aws help aws <command> help aws <command> <subcommand> help aws: error: argument command: Invalid choice, valid choices are: acm | acm-pca alexaforbusiness | amplify apigateway | apigatewaymanagementapi apigatewayv2 | application-autoscaling ... support | swf transcribe | transfer translate | waf waf-regional | workdocs workmail | workspaces xray | s3api s3 | configure deploy | configservice opsworks-cm | runtime.sagemaker history | help |
$aws configure
AWS Access Key ID [None]: AKIAICURZPV5ZJ3CXGDA AWS Secret Access Key [None]: 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 Default region name [None]: eu-west-1 Default output format [None]: |
$find creden ./
![]() find: ‘creden’: No such file or directory ./ ./.l3rc ./Desktop ./m2_id_rsa.pub ./.bash_history ./Pictures ./libappindicator3-1_0.4.92-4_i386.deb ./.local ./.local/share ... ./AWS/.git/logs/refs ./AWS/.git/logs/refs/heads ./AWS/.git/logs/refs/heads/master ./AWS/.git/logs/refs/remotes ./AWS/.git/logs/refs/remotes/origin ./AWS/.git/logs/refs/remotes/origin/master ./AWS/.git/info ./AWS/.git/info/exclude ./Music ./.tatyanaDNS.txt.swp |
$ls -la
total 55552 drwxr-xr-x 20 user user 4096 Dec 19 11:33 . drwxr-xr-x 4 root root 4096 Dec 16 14:01 .. drwxr-xr-x 3 user user 4096 Dec 17 16:45 AWS -rw------- 1 user user 6648 Dec 19 13:58 .bash_history -rw-r--r-- 1 user user 220 May 15 2017 .bash_logout -rw-r--r-- 1 user root 10 Dec 16 14:23 .bash_profile -rw-r--r-- 1 user user 636 Dec 17 12:41 .bashrc drwx------ 9 user user 4096 Dec 18 11:47 .cache drwx------ 12 user user 4096 Dec 18 11:47 .config ... drwx------ 3 user user 4096 Dec 18 11:47 .pki -rw-r--r-- 1 user user 675 May 15 2017 .profile drwxr-xr-x 2 user user 4096 Dec 17 12:15 Public -rw-r--r-- 1 user user 108 Dec 19 11:06 Readme.txt drwx------ 2 user user 4096 Dec 19 11:33 .ssh -rw------- 1 user user 12288 Dec 19 11:19 .tatyanaDNS.txt.swp drwxr-xr-x 2 user user 4096 Dec 17 12:15 Templates drwxr-xr-x 2 user user 4096 Dec 17 12:15 Videos -rw------- 1 user user 8183 Dec 19 11:33 .viminfo -rw-r--r-- 1 user user 103 Dec 17 14:43 V.json |
$ls -la | grep cred
![]() |
$su -
![]() Password: su: Authentication failure |
$su -
Password: Removing stale pidfile root@m3:~# cat credentials.csv | tr , '\n' user3 nXcLgqp@w{=v AKIAICURZPV5ZJ3CXGDA r8qVLcjn01LIb6/4e0RJd0ZAWbFmVgaQz2ubgl32 https://chubin.signin.aws.amazon.com/console root@m3:~# root@m3:~# root@m3:~# logout |
$aws describe-instances
![]() usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters] To see help text, you can run: aws help aws <command> help aws <command> <subcommand> help aws: error: argument command: Invalid choice, valid choices are: acm | acm-pca alexaforbusiness | amplify apigateway | apigatewaymanagementapi apigatewayv2 | application-autoscaling ... support | swf transcribe | transfer translate | waf waf-regional | workdocs workmail | workspaces xray | s3api s3 | configure deploy | configservice opsworks-cm | runtime.sagemaker history | help |
$aws ec2 describe-instances
{ "Reservations": [ { "Instances": [ { "Monitoring": { "State": "disabled" }, "PublicDnsName": "ec2-52-19-122-40.eu-west-1.compute.amazonaws.com", "State": { ... }, "AmiLaunchIndex": 0 } ], "ReservationId": "r-0c0e59eec99ee07d6", "Groups": [], "OwnerId": "886677986286" } ] } |
$aws ec2 describe-instances | jq.Reservations | less -R
|
$aws ec2 describe-instances | jq .Reservations | less -R
|
$aws ec2 describe-instances | jq .Reservations | less -R
|
$aws ec2 describe-instances | jq .Reservations | less -R
|
$aws ec2 describe-instances | jq .Reservations.Instances[0] | less -R
|
$aws ec2 describe-instances | jq .Reservations[0] | less -R
|
$aws ec2 describe-instances | jq .Reservations[0].Instances | less -R
|
$aws ec2 describe-instances | jq .Reservations[0].Instances[0] | less -R
|
$aws ec2 describe-instances | jq .Reservations[0].Instances[0].Monitoring | less -R
|
$aws ec2 describe-instances | jq .Reservations[0].Instances[0].Monitoring.State | less -R
|
$complete -C aws_completer aws
|
$comp
![]() compare compare-im6.q16 complete compose composite-im6 compare-im6 compgen compopt composite composite-im6.q16 |
$comp
![]() compare compare-im6.q16 complete compose composite-im6 compare-im6 compgen compopt composite composite-im6.q16 |
$complete
![]() Display all 2067 possibilities? (y or n) |
$vi .bash
![]() |
$vi .bashrc
|
$aw
![]() awk aws aws_bash_completer aws.cmd aws_completer aws_zsh_completer.sh |
$aws
![]() aws aws_bash_completer aws.cmd aws_completer aws_zsh_completer.sh |
$aws
![]() aws aws_bash_completer aws.cmd aws_completer aws_zsh_completer.sh |
$aws de
deploy devicefarm |
$aws ec2 describe-c
![]() describe-capacity-reservations describe-client-vpn-connections describe-client-vpn-target-networks describe-classic-link-instances describe-client-vpn-endpoints describe-conversion-tasks describe-client-vpn-authorization-rules describe-client-vpn-routes describe-customer-gateways |
$aws ec2 describe-c
![]() describe-capacity-reservations describe-client-vpn-connections describe-client-vpn-target-networks describe-classic-link-instances describe-client-vpn-endpoints describe-conversion-tasks describe-client-vpn-authorization-rules describe-client-vpn-routes describe-customer-gateways |
$aws ec2 describe-in
![]() describe-instance-attribute describe-instances describe-internet-gateways describe-instance-credit-specifications describe-instance-status |
$pip install saws
Collecting saws Downloading https://files.pythonhosted.org/packages/ef/7a/37581ad99e8aefc9976c463fb7741593e1ff91dea2228ec5f889ba6b9e33/saws-0.4.3.tar.gz (46kB) 100% |████████████████████████████████| 51kB 801kB/s Collecting awscli<2.0.0,>=1.7.46 (from saws) Downloading https://files.pythonhosted.org/packages/46/f9/9cdf9450b8fbb7f06aa1af2581dc3f261ef965185f0a45f4aaa008351e81/awscli-1.16.78-py2.py3-none-any.whl (1.4MB) 100% |████████████████████████████████| 1.4MB 405kB/s Collecting click<7.0,>=4.0 (from saws) Downloading https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl (71kB) 100% |████████████████████████████████| 71kB 782kB/s Collecting configobj<6.0.0,>=5.0.6 (from saws) ... Collecting colorama<=0.3.9,>=0.2.5 (from awscli<2.0.0,>=1.7.46->saws) Downloading https://files.pythonhosted.org/packages/db/c8/7dcf9dbcb22429512708fe3a547f8b6101c0d02137acbd892505aee57adf/colorama-0.3.9-py2.py3-none-any.whl Collecting rsa<=3.5.0,>=3.1.2 (from awscli<2.0.0,>=1.7.46->saws) Downloading https://files.pythonhosted.org/packages/e1/ae/baedc9cb175552e95f3395c43055a6a5e125ae4d48a1d7a924baca83e92e/rsa-3.4.2-py2.py3-none-any.whl (46kB) 100% |████████████████████████████████| 51kB 1.8MB/s Collecting s3transfer<0.2.0,>=0.1.12 (from awscli<2.0.0,>=1.7.46->saws) Downloading https://files.pythonhosted.org/packages/d7/14/2a0004d487464d120c9fb85313a75cd3d71a7506955be458eebfe19a6b1d/s3transfer-0.1.13-py2.py3-none-any.whl (59kB) 100% |████████████████████████████████| 61kB 1.5MB/s Collecting botocore==1.12.68 (from awscli<2.0.0,>=1.7.46->saws) Downloading https://files.pythonhosted.org/packages/00/59/28cc07ee9486402d3d016314e7895b763489015a5d4a234d658022095650/botocore-1.12.68-py2.py3-none-any.whl (5.2MB) |
$saws
![]() bash: saws: command not found |
$sawc
![]() bash: sawc: command not found |
$saws
![]() bash: saws: command not found |
$aws
![]() aws aws_bash_completer aws.cmd aws_completer aws_zsh_completer.sh |
$aws ec
![]() ec2 ecr ecs |
$aws ec2
![]() Display all 328 possibilities? (y or n) |
$saws ec2
![]() .aws/ .gnome/ Pictures/ AWS/ .gnupg/ .pki/ .bash_history google-chrome-stable_current_amd64.deb .profile .bash_logout .ICEauthority Public/ .bash_profile .l3rc Readme.txt .bashrc libappindicator3-1_0.4.92-4_amd64.deb .ssh/ .cache/ libappindicator3-1_0.4.92-4_i386.deb .tatyanaDNS.txt.swp .config/ .lilalo/ Templates/ Desktop/ .local/ Videos/ Documents/ m1_id_rsa.pub .viminfo Downloads/ m2_id_rsa.pub V.json .gitconfig .mozilla/ github.txt Music/ |
$saws
No resource cache found Refreshing resources... Refreshing instance ids... Refreshing instance tag keys... Refreshing instance tag values... Refreshing bucket names... Refreshing bucket uris... Done refreshing Version: 0.4.3 Theme: vim ... d scribe-instances --query 'Reservations[*].Instances[?KeyName==`user3`].[In tanceId]' --output t xt ]' --output tettrminate-instances --instance-ids $( aws ec2 describe-instances --query 'Re ervations[*].Instanc s[?KeyName==`user3`].[InstanceId d scribe-instances --query 'Reservations[*].Instances[?KeyName==`user3`].[In tanceId]' --output t xt ]' --output tettrminate-instances --instance-ids $( aws ec2 describe-instances --query 'Re ervations[*].Instanc s[?KeyName==`user3`].[InstanceId d scribe-instances --query 'Reservations[*].Instances[?KeyName==`user3`].[In tanceId]' --output t xt ]' --output tettrminate-instances --instance-ids $( aws ec2 describe-instances --query 'Re ervations[*].Instanc s[?KeyName==`user3`].[InstanceId d scribe-instances --query 'Reservations[*].Instances[?KeyName==`user3`].[In tanceId]' --output t xt ]' --output tettrminate-instances --instance-ids $( aws ec2 describe-instances --query 'Re ervations[*].Instanc s[?KeyName==`user3`].[InstanceId d scribe-instances --query 'Reservations[*].Instances[?KeyName==`user3`].[In tanceId]' --output t xt saws> |
$mkdir scripts
|
$vim scripts/create-infrastructure.sh
![]() |
$vim scripts/create-infrastructure.sh
|
$vim scripts/create-infrastructure.sh
|
$[Command Line] 5,0-1 All |