/l3/users/slm/2018-12-minsk-aws/student06.BigClassRoom/user :1 :2 :3 :4 :5 :6 :7 |
|
$ls -la
total 24 drwxr-xr-x 4 user user 4096 Dec 17 16:27 . drwxr-xr-x 18 user user 4096 Dec 17 16:15 .. drwxr-xr-x 3 user user 4096 Dec 17 16:27 aws drwxr-xr-x 8 user user 4096 Dec 17 16:27 .git -rw-r--r-- 1 user user 38 Dec 17 16:27 Hello_world.md -rw-r--r-- 1 user user 33 Dec 17 16:01 README.md |
$rm -r aws
rm: remove write-protected regular file 'aws/.git/objects/cd/25b3311ef713315a1d1973dfc8091212d9a030'? y rm: remove write-protected regular file 'aws/.git/objects/1f/6d9882a7af72d304f40f1bf1c6af8dc8fedebf'? y rm: remove write-protected regular file 'aws/.git/objects/c2/b9cc0d84fa85e9677e8d10251237af2b1c1d7e'? y rm: remove write-protected regular file 'aws/.git/objects/88/26f0cff90d48ec89af015b9844aa078dd50bc1'? y rm: remove write-protected regular file 'aws/.git/objects/e9/caaf9c9327e8a1c930d12b0eee653a43d5c9ce'? y rm: remove write-protected regular file 'aws/.git/objects/dd/ff4fc1499affd9055b18404b2616a268400a60'? y rm: remove write-protected regular file 'aws/.git/objects/6d/04c096fbcf8a961d404cb362f0feec02e1b8e2'? y rm: remove write-protected regular file 'aws/.git/objects/8d/2d83520e46318d64acf5df71a251ba64f30a71'? y rm: remove write-protected regular file 'aws/.git/objects/6a/2bb86d37a76c977852078ea0fc4643a8310ac9'? y |
$ls -la
total 20 drwxr-xr-x 3 user user 4096 Dec 17 16:28 . drwxr-xr-x 18 user user 4096 Dec 17 16:15 .. drwxr-xr-x 8 user user 4096 Dec 17 16:27 .git -rw-r--r-- 1 user user 38 Dec 17 16:27 Hello_world.md -rw-r--r-- 1 user user 33 Dec 17 16:01 README.md |
$cd ..
|
$ls -la
total 120 drwxr-xr-x 18 user user 4096 Dec 17 16:15 . drwxr-xr-x 4 root root 4096 Dec 16 14:01 .. drwxr-xr-x 3 user user 4096 Dec 17 16:28 aws -rw------- 1 user user 18 Dec 17 12:27 .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 638 Dec 17 12:42 .bashrc drwx------ 11 user user 4096 Dec 17 14:32 .cache drwx------ 10 user user 4096 Dec 17 12:17 .config ... drwx------ 5 user user 4096 Dec 17 14:32 .mozilla drwxr-xr-x 2 user user 4096 Dec 17 12:15 Music drwxr-xr-x 2 user user 4096 Dec 17 12:15 Pictures -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 17 12:23 .ssh drwxr-xr-x 2 user user 4096 Dec 17 12:15 Templates -rw-r--r-- 1 user user 77 Dec 17 14:45 test.json drwxr-xr-x 2 user user 4096 Dec 17 12:15 Videos -rw------- 1 user user 7263 Dec 17 16:06 .viminfo |
$cd aws/
|
$ls -al
total 20 drwxr-xr-x 3 user user 4096 Dec 17 16:28 . drwxr-xr-x 18 user user 4096 Dec 17 16:15 .. drwxr-xr-x 8 user user 4096 Dec 17 16:27 .git -rw-r--r-- 1 user user 38 Dec 17 16:27 Hello_world.md -rw-r--r-- 1 user user 33 Dec 17 16:01 README.md |
$vi Hello_world.md
|
$Introduction to hello/goodbuy file.
|
$dit diff
bash: dit: command not found |
$git diff
diff --git a/Hello_world.md b/Hello_world.md index 8826f0c..e3b542c 100644 --- a/Hello_world.md +++ b/Hello_world.md @@ -1,5 +1,12 @@ +## Introduction + +Introduction to hello/goodbuy file. + ## Hello Hello **world** ## Goodbuy + +Goodbuy **world** + |
$git status
On branch master Your branch is up-to-date with 'origin/master'. Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: Hello_world.md no changes added to commit (use "git add" and/or "git commit -a") |
$git add -p
diff --git a/Hello_world.md b/Hello_world.md index 8826f0c..e3b542c 100644 --- a/Hello_world.md +++ b/Hello_world.md @@ -1,5 +1,12 @@ +## Introduction + +Introduction to hello/goodbuy file. + ## Hello ... ## Hello Hello **world** ## Goodbuy + +Goodbuy **world** + Stage this hunk [y,n,q,a,d,/,K,g,e,?]? y <stdin>:13: new blank line at EOF. + warning: 1 line adds whitespace errors. |
$git commit -m 'Goodbuy text added (fixes #1)'
[master 21801c2] Goodbuy text added (fixes #1) 1 file changed, 3 insertions(+) |
$git commit -m 'Added introduction'
[master 8a9592f] Added introduction 1 file changed, 4 insertions(+) |
$git push
Username for 'https://github.com': DmitrySnitko Password for 'https://DmitrySnitko@github.com': Counting objects: 6, done. Delta compression using up to 4 threads. Compressing objects: 100% (6/6), done. Writing objects: 100% (6/6), 677 bytes | 0 bytes/s, done. Total 6 (delta 0), reused 0 (delta 0) To https://github.com/DmitrySnitko/aws 8d2d835..8a9592f master -> master |
$ifconfig
bash: ifconfig: command not found |
$sudo ipconfig
[sudo] password for user: sudo: ipconfig: command not found |
$sudo ifconfig
sudo: ifconfig: command not found |
$ip
Usage: ip [ OPTIONS ] OBJECT { COMMAND | help } ip [ -force ] -batch filename where OBJECT := { link | address | addrlabel | route | rule | neigh | ntable | tunnel | tuntap | maddress | mroute | mrule | monitor | xfrm | netns | l2tp | fou | macsec | tcp_metrics | token | netconf | ila } OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] | -h[uman-readable] | -iec | -f[amily] { inet | inet6 | ipx | dnet | mpls | bridge | link } | -4 | -6 | -I | -D | -B | -0 | -l[oops] { maximum-addr-flush-attempts } | -br[ief] | -o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] | -rc[vbuf] [size] | -n[etns] name | -a[ll] | -c[olor]} |
$ip show
Object "show" is unknown, try "ip help". |
$ip int show
Object "int" is unknown, try "ip help". |
$ls -la
total 120 drwxr-xr-x 18 user user 4096 Dec 18 10:14 . 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 2632 Dec 17 17:04 .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 638 Dec 17 12:42 .bashrc drwx------ 11 user user 4096 Dec 17 14:32 .cache drwx------ 10 user user 4096 Dec 17 12:17 .config ... drwx------ 5 user user 4096 Dec 17 14:32 .mozilla drwxr-xr-x 2 user user 4096 Dec 17 12:15 Music drwxr-xr-x 2 user user 4096 Dec 17 12:15 Pictures -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 17 12:23 .ssh drwxr-xr-x 2 user user 4096 Dec 17 12:15 Templates -rw-r--r-- 1 user user 77 Dec 17 14:45 test.json drwxr-xr-x 2 user user 4096 Dec 17 12:15 Videos -rw------- 1 user user 7463 Dec 17 16:45 .viminfo |
$ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link/ether 54:04:a6:bf:51:30 brd ff:ff:ff:ff:ff:ff |
$ip address show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 54:04:a6:bf:51:30 brd ff:ff:ff:ff:ff:ff inet 172.20.13.190/25 brd 172.20.13.255 scope global dynamic enp1s0 valid_lft 690986sec preferred_lft 690986sec inet6 fe80::5604:a6ff:febf:5130/64 scope link valid_lft forever preferred_lft forever |
$ssh 172.20.13.3
ssh: connect to host 172.20.13.3 port 22: No route to host |
$history
1 ssh 172.20.13.190 2 su - 3 vi ~/.bashrc 4 . /etc/bash_completion 5 ll ~/ 6 ls -la ~/ 7 sudo apt-get install hdparm 8 hd -a 9 cat /proc/partitions 10 df -ah ... 110 ifconfig 111 sudo ipconfig 112 sudo ifconfig 113 ip 114 ip show 115 ip int show 116 ip link show 117 ip address show 118 ssh 172.20.13.3 119 history |
$ssh 172.20.13.183
[user@instructor:~]$ /sbin/ifconfig inet 172.20.13.183 netmask 255.255.255.128 broadcast 172.20.13.255 enp3s0: inet6 fe80::3285:a9ff:fe9e:10aa prefixlen 64 scopeid 0x20<link> ether 30:85:a9:9e:10:aa txqueuelen 1000 (Ethernet) RX packets 1276 bytes 451436 (440.8 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 840 bytes 99708 (97.3 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 ... RX packets 231 bytes 42292 (41.3 KiB) # www.yasiv.com/github/ RX errors 0 dropped 0 overruns 0 frame 0 TX packets 231 bytes 42292 (41.3 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 [user@instructor:~]$ [user@instructor:~]$ [user@instructor:~]$ [user@instructor:~]$ ------------------------------------------------------------------------------ |
$ls -la aws/
total 20 drwxr-xr-x 3 user user 4096 Dec 17 16:45 . drwxr-xr-x 18 user user 4096 Dec 18 10:14 .. drwxr-xr-x 8 user user 4096 Dec 17 16:50 .git -rw-r--r-- 1 user user 112 Dec 17 16:45 Hello_world.md -rw-r--r-- 1 user user 33 Dec 17 16:01 README.md |
$ls -la /home/root
ls: cannot access '/home/root': No such file or directory |
$sudo ls -la /home/root
[sudo] password for user: Sorry, try again. [sudo] password for user: ls: cannot access '/home/root': No such file or directory |
$sudo ls -la /
total 96 drwxr-xr-x 23 root root 4096 Dec 15 20:36 . drwxr-xr-x 23 root root 4096 Dec 15 20:36 .. drwxr-xr-x 2 root root 4096 Dec 15 20:33 bin drwxr-xr-x 3 root root 4096 Dec 15 20:39 boot drwx------ 2 root root 4096 Dec 15 20:36 .cache drwxr-xr-x 18 root root 3120 Dec 18 10:13 dev drwxr-xr-x 123 root root 12288 Dec 18 10:14 etc drwxr-xr-x 4 root root 4096 Dec 16 14:01 home lrwxrwxrwx 1 root root 29 Dec 15 19:58 initrd.img -> boot/initrd.img-4.9.0-8-amd64 ... drwx------ 5 root root 4096 Dec 17 12:41 root drwxr-xr-x 22 root root 660 Dec 18 10:14 run drwxr-xr-x 2 root root 4096 Dec 15 20:43 sbin drwxr-xr-x 2 root root 4096 Dec 15 19:56 srv dr-xr-xr-x 13 root root 0 Dec 18 10:13 sys drwxrwxrwt 14 root root 4096 Dec 18 10:51 tmp drwxr-xr-x 10 root root 4096 Dec 15 19:56 usr drwxr-xr-x 11 root root 4096 Dec 15 19:56 var lrwxrwxrwx 1 root root 26 Dec 15 19:58 vmlinuz -> boot/vmlinuz-4.9.0-8-amd64 lrwxrwxrwx 1 root root 26 Dec 15 19:58 vmlinuz.old -> boot/vmlinuz-4.9.0-8-amd64 |
$sudo ls -la /root/
total 60 drwx------ 5 root root 4096 Dec 17 12:41 . drwxr-xr-x 23 root root 4096 Dec 15 20:36 .. -rw------- 1 root root 222 Dec 17 12:41 .bash_history -rw-r--r-- 1 root root 10 Dec 16 14:23 .bash_profile -rw-r--r-- 1 root root 641 Dec 17 12:41 .bashrc drwx------ 2 root root 4096 Dec 15 20:44 .cache -rw-r--r-- 1 root root 127 Dec 16 14:41 credentials.csv -rw-r--r-- 1 root root 0 Dec 16 14:33 .hushlogin -rw-r--r-- 1 root root 62 Dec 16 14:23 .l3rc drwxr-xr-x 2 root root 4096 Dec 17 12:17 .lilalo -rw-r--r-- 1 root root 5295 Dec 16 14:22 lilalo-install -rw-r--r-- 1 root root 148 Aug 17 2015 .profile -rwxr-xr-x 1 root root 66 Dec 16 14:02 setpasswd drwxr-xr-x 2 root root 4096 Dec 16 13:00 .ssh -rw------- 1 root root 1580 Dec 17 12:41 .viminfo |
$sudo cp /root/credentials.csv /home/user/
|
$ls -al
total 124 drwxr-xr-x 18 user user 4096 Dec 18 10:52 . 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 2632 Dec 17 17:04 .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 638 Dec 17 12:42 .bashrc drwx------ 11 user user 4096 Dec 17 14:32 .cache drwx------ 10 user user 4096 Dec 17 12:17 .config ... drwx------ 5 user user 4096 Dec 17 14:32 .mozilla drwxr-xr-x 2 user user 4096 Dec 17 12:15 Music drwxr-xr-x 2 user user 4096 Dec 17 12:15 Pictures -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 17 12:23 .ssh drwxr-xr-x 2 user user 4096 Dec 17 12:15 Templates -rw-r--r-- 1 user user 77 Dec 17 14:45 test.json drwxr-xr-x 2 user user 4096 Dec 17 12:15 Videos -rw------- 1 user user 7463 Dec 17 16:45 .viminfo |
$cat credentials.csv
user6,tk=l#erR3XY8,AKIAJO7Q5VCMZGOFCKXQ,xDZdIa4RXgL86vMHs1L8u1ufZMSbv81rK0D/zGMm,https://chubin.signin.aws.amazon.com/console |
$cat credentials.csv |tr , '\n'
user6 tk=l#erR3XY8 AKIAJO7Q5VCMZGOFCKXQ xDZdIa4RXgL86vMHs1L8u1ufZMSbv81rK0D/zGMm https://chubin.signin.aws.amazon.com/console |
$cd /r
root/ run/ |
$cd /r
root/ run/ |
$cd /root/
bash: cd: /root/: Permission denied |
$sudo cd /root/
sudo: cd: command not found |
$sudo rm /root/credentials.csv
|
$sudo ls -la /root
total 56 drwx------ 5 root root 4096 Dec 18 10:59 . drwxr-xr-x 23 root root 4096 Dec 15 20:36 .. -rw------- 1 root root 222 Dec 17 12:41 .bash_history -rw-r--r-- 1 root root 10 Dec 16 14:23 .bash_profile -rw-r--r-- 1 root root 641 Dec 17 12:41 .bashrc drwx------ 2 root root 4096 Dec 15 20:44 .cache -rw-r--r-- 1 root root 0 Dec 16 14:33 .hushlogin -rw-r--r-- 1 root root 62 Dec 16 14:23 .l3rc drwxr-xr-x 2 root root 4096 Dec 17 12:17 .lilalo -rw-r--r-- 1 root root 5295 Dec 16 14:22 lilalo-install -rw-r--r-- 1 root root 148 Aug 17 2015 .profile -rwxr-xr-x 1 root root 66 Dec 16 14:02 setpasswd drwxr-xr-x 2 root root 4096 Dec 16 13:00 .ssh -rw------- 1 root root 1580 Dec 17 12:41 .viminfo |
$ls -la
total 124 drwxr-xr-x 18 user user 4096 Dec 18 10:52 . 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 2632 Dec 17 17:04 .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 638 Dec 17 12:42 .bashrc drwx------ 11 user user 4096 Dec 17 14:32 .cache drwx------ 10 user user 4096 Dec 17 12:17 .config ... drwx------ 5 user user 4096 Dec 17 14:32 .mozilla drwxr-xr-x 2 user user 4096 Dec 17 12:15 Music drwxr-xr-x 2 user user 4096 Dec 17 12:15 Pictures -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 17 12:23 .ssh drwxr-xr-x 2 user user 4096 Dec 17 12:15 Templates -rw-r--r-- 1 user user 77 Dec 17 14:45 test.json drwxr-xr-x 2 user user 4096 Dec 17 12:15 Videos -rw------- 1 user user 7463 Dec 17 16:45 .viminfo |
$ls -la
total 128 drwxr-xr-x 18 user user 4096 Dec 18 12:50 . 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 2632 Dec 17 17:04 .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 638 Dec 17 12:42 .bashrc drwx------ 11 user user 4096 Dec 17 14:32 .cache drwx------ 10 user user 4096 Dec 17 12:17 .config ... drwxr-xr-x 2 user user 4096 Dec 17 12:15 Music drwxr-xr-x 2 user user 4096 Dec 17 12:15 Pictures -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 17 12:23 .ssh drwxr-xr-x 2 user user 4096 Dec 17 12:15 Templates -rw-r--r-- 1 user user 77 Dec 17 14:45 test.json -rw-r--r-- 1 user user 1692 Dec 18 12:50 user6.pem drwxr-xr-x 2 user user 4096 Dec 17 12:15 Videos -rw------- 1 user user 7463 Dec 17 16:45 .viminfo |
$mv user6.pem .ssh/
|
$ls -la | grep user
drwxr-xr-x 18 user user 4096 Dec 18 12:52 . drwxr-xr-x 3 user user 4096 Dec 17 16:45 aws -rw------- 1 user user 2632 Dec 17 17:04 .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 638 Dec 17 12:42 .bashrc drwx------ 11 user user 4096 Dec 17 14:32 .cache drwx------ 10 user user 4096 Dec 17 12:17 .config drwxr-xr-x 2 user user 4096 Dec 17 12:15 Desktop drwxr-xr-x 2 user user 4096 Dec 17 12:15 Documents ... drwx------ 5 user user 4096 Dec 17 14:32 .mozilla drwxr-xr-x 2 user user 4096 Dec 17 12:15 Music drwxr-xr-x 2 user user 4096 Dec 17 12:15 Pictures -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 18 12:52 .ssh drwxr-xr-x 2 user user 4096 Dec 17 12:15 Templates -rw-r--r-- 1 user user 77 Dec 17 14:45 test.json drwxr-xr-x 2 user user 4096 Dec 17 12:15 Videos -rw------- 1 user user 7463 Dec 17 16:45 .viminfo |
$ls | grep user
|
$ls ~/.ssh/| grep user
user6.pem |
$ls -la .ssh/
total 16 drwx------ 2 user user 4096 Dec 18 12:52 . drwxr-xr-x 18 user user 4096 Dec 18 12:52 .. -rw-r--r-- 1 user user 444 Dec 17 12:26 known_hosts -rw-r--r-- 1 user user 1692 Dec 18 12:50 user6.pem |
$vi .ssh/config
|
$cat .ssh/config
Host *compute.amazonaws.com |
$vi .ssh/config
|
$vi .ssh/config
|
$cat .ssh/config
Host *.compute.amazonaws.com IdentityFile ~/.ssh/user6.pem User ec2-user |
$ssh ec2-34-245-172-84.eu-west-1.compute.amazonaws.com
The authenticity of host 'ec2-34-245-172-84.eu-west-1.compute.amazonaws.com (34.245.172.84)' can't be established. ECDSA key fingerprint is SHA256:Bc5YdfQsrrs4zXkdbQZ8B+gEOuqeY2WFyqQVuvniGKw. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ec2-34-245-172-84.eu-west-1.compute.amazonaws.com,34.245.172.84' (ECDSA) to the list of known hosts. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0644 for '/home/user/.ssh/user6.pem' are too open. It is required that your private key files are NOT accessible by others. This private key will be ignored. Load key "/home/user/.ssh/user6.pem": bad permissions Permission denied (publickey,gssapi-keyex,gssapi-with-mic). |
$ls -la .ssh/
total 32 drwx------ 2 user user 4096 Dec 18 13:00 . drwxr-xr-x 18 user user 4096 Dec 18 13:00 .. -rw-r--r-- 1 user user 78 Dec 18 13:00 config -rw-r--r-- 1 user user 12288 Dec 18 12:59 .config.swp -rw-r--r-- 1 user user 888 Dec 18 15:15 known_hosts -rw-r--r-- 1 user user 1692 Dec 18 12:50 user6.pem |
$man chmod
|
$man chmod
|
$chmod o -r .ssh/user6.pem
chmod: cannot access 'o': No such file or directory |
$chmod -r o .ssh/user6.pem
chmod: cannot access 'o': No such file or directory |
$chmod -ro .ssh/user6.pem
chmod: invalid mode: ‘-ro’ Try 'chmod --help' for more information. |
$chmod --help
Usage: chmod [OPTION]... MODE[,MODE]... FILE... or: chmod [OPTION]... OCTAL-MODE FILE... or: chmod [OPTION]... --reference=RFILE FILE... Change the mode of each FILE to MODE. With --reference, change the mode of each FILE to that of RFILE. -c, --changes like verbose but report only when a change is made -f, --silent, --quiet suppress most error messages -v, --verbose output a diagnostic for every file processed --no-preserve-root do not treat '/' specially (the default) --preserve-root fail to operate recursively on '/' --reference=RFILE use RFILE's mode instead of MODE values -R, --recursive change files and directories recursively --help display this help and exit --version output version information and exit Each MODE is of the form '[ugoa]*([-+=]([rwxXst]*|[ugo]))+|[-+=][0-7]+'. GNU coreutils online help: <http://www.gnu.org/software/coreutils/> Full documentation at: <http://www.gnu.org/software/coreutils/chmod> or available locally via: info '(coreutils) chmod invocation' |
$chmod 600 .ssh/user6.pem
|
$ssh ec2-34-245-191-226.eu-west-1.compute.amazonaws.com
The authenticity of host 'ec2-34-245-191-226.eu-west-1.compute.amazonaws.com (34.245.191.226)' can't be established. ECDSA key fingerprint is SHA256:V7wDtFPt99Ofmh5YxCtBSunYL7Pf1N2rmWnmiCs5Or8. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ec2-34-245-191-226.eu-west-1.compute.amazonaws.com,34.245.191.226' (ECDSA) to the list of known hosts. __| __|_ ) _| ( / Amazon Linux 2 AMI ___|\___|___| https://aws.amazon.com/amazon-linux-2/ 1 package(s) needed for security, out of 5 available Run "sudo yum update" to apply all updates. ... [root@ip-10-3-1-17 ec2-user]# [root@ip-10-3-1-17 ec2-user]# [root@ip-10-3-1-17 ec2-user]# exit exit [ec2-user@ip-10-3-1-17 ~]$ exit logout There are stopped jobs. [ec2-user@ip-10-3-1-17 ~]$ exit logout Connection to ec2-34-245-191-226.eu-west-1.compute.amazonaws.com closed. |
$ssh ec2-34-245-172-84.eu-west-1.compute.amazonaws.com
Last login: Tue Dec 18 12:21:00 2018 from port-90-adslby-pool35.infonet.by __| __|_ ) _| ( / Amazon Linux 2 AMI ___|\___|___| https://aws.amazon.com/amazon-linux-2/ 1 package(s) needed for security, out of 5 available Run "sudo yum update" to apply all updates. [ec2-user@ip-10-3-1-158 ~]$ sudo -s [root@ip-10-3-1-158 ec2-user]# yum install iperf3 Loaded plugins: extras_suggestions, langpacks, priorities, update-motd ... ----------------------------------------------------------- ^Ciperf3: interrupt - the server has terminated [root@ip-10-3-1-158 ec2-user]# [root@ip-10-3-1-158 ec2-user]# [root@ip-10-3-1-158 ec2-user]# [root@ip-10-3-1-158 ec2-user]# exit exit [ec2-user@ip-10-3-1-158 ~]$ exit logout Connection to ec2-34-245-172-84.eu-west-1.compute.amazonaws.com closed. |
$ssh 172.20.13.183
user@172.20.13.183's password: Linux instructor 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. KBYueEmQJjYIUkuuUGmI7TNo55wQB2sIWIBhR04xpY3VSwecClgTLqCkaYegZxbhOPNuvHDWehftqc 1zF7RL1i3MMYhJL0yjr1K0xRbBHzwsvcMpGiDhAc0qr6EhKBKVOD8iERusFj user10 [ec2-user@ip-10-2-1-85 ~]$ cat -n ~/.ssh/authorized_keys ... valid_lft forever preferred_lft forever 2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state U group default qlen 1000 link/ether 30:85:a9:9e:10:aa brd ff:ff:ff:ff:ff:ff inet 172.20.13.183/25 brd 172.20.13.255 scope global dynamic enp3s0 valid_lft 689452sec preferred_lft 689452sec inet6 fe80::3285:a9ff:fe9e:10aa/64 scope link valid_lft forever preferred_lft forever [user@instructor:~]$ ------------------------------------------------------------------------------ |
$ip -s addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever RX: bytes packets errors dropped overrun mcast 13596 172 0 0 0 0 TX: bytes packets errors dropped carrier collsns 13596 172 0 0 0 0 2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 54:04:a6:bf:51:30 brd ff:ff:ff:ff:ff:ff inet 172.20.13.190/25 brd 172.20.13.255 scope global dynamic enp1s0 valid_lft 690476sec preferred_lft 690476sec inet6 fe80::5604:a6ff:febf:5130/64 scope link valid_lft forever preferred_lft forever RX: bytes packets errors dropped overrun mcast 13020777 13195 0 0 0 350 TX: bytes packets errors dropped carrier collsns 1947078 9924 0 0 0 0 |
$ssh-keygen
Generating public/private rsa key pair. Enter file in which to save the key (/home/user/.ssh/id_rsa): ssh-key Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in ssh-key. Your public key has been saved in ssh-key.pub. The key fingerprint is: SHA256:SNSPRae1639WTHD/zsSzgqMviSZMUevi3rC4HS99Gz8 user@m6 The key's randomart image is: +---[RSA 2048]----+ | .. .. o | | . .. .+ .. .| | o .+. . o.| | o o. . . o| | + S . +.| | o . . .*| | +oo ... o ++| | o=*+ +oE o .=| | oo++o.o=oo oo | +----[SHA256]-----+ |
$ls -la
total 136 drwxr-xr-x 18 user user 4096 Dec 19 10:44 . 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 3613 Dec 18 17:05 .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 638 Dec 17 12:42 .bashrc drwx------ 11 user user 4096 Dec 17 14:32 .cache drwx------ 10 user user 4096 Dec 17 12:17 .config ... drwxr-xr-x 2 user user 4096 Dec 17 12:15 Pictures -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 18 13:00 .ssh -rw------- 1 user user 1766 Dec 19 10:44 ssh-key -rw-r--r-- 1 user user 389 Dec 19 10:44 ssh-key.pub drwxr-xr-x 2 user user 4096 Dec 17 12:15 Templates -rw-r--r-- 1 user user 77 Dec 17 14:45 test.json drwxr-xr-x 2 user user 4096 Dec 17 12:15 Videos -rw------- 1 user user 8544 Dec 18 16:58 .viminfo |
$scp
scp scp-dbus-service |
$scp
scp scp-dbus-service |
$scp ?
aws/ Downloads/ Public/ test.json credentials.csv github.txt ssh-key Videos/ Desktop/ Music/ ssh-key.pub Documents/ Pictures/ Templates/ |
$man scp
|
$scp -c ssh-key.pub m7:~/m6_id_rsa.pub
usage: scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file2 |
$scp ssh-key.pub user@m7:~/m6_id_rsa.pub
The authenticity of host 'm7 (172.20.13.191)' can't be established. ECDSA key fingerprint is SHA256:PE5WVxUUBq1ZkwUUc5lrBwE+cJPyMTyIYBiYpsWycnY. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'm7,172.20.13.191' (ECDSA) to the list of known hosts. user@m7's password: ssh-key.pub 100% 389 651.2KB/s 00:00 |
$ssh m7
user@m7's password: Linux m7 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. user@m7:~$ ls -la total 132 drwxr-xr-x 18 user user 4096 Dec 19 10:54 . ... drwxr-xr-x 2 user user 4096 Dec 17 12:15 Public -rw------- 1 user user 1766 Dec 19 10:43 ssh drwx------ 2 user user 4096 Dec 19 10:44 .ssh -rw-r--r-- 1 user user 389 Dec 19 10:43 ssh.pub drwxr-xr-x 2 user user 4096 Dec 17 12:15 Templates -rw-r--r-- 1 user user 1696 Dec 18 12:48 user7.pem drwxr-xr-x 2 user user 4096 Dec 17 12:15 Videos user@m7:~$ exit logout Connection to m7 closed. |
$ip -s addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever RX: bytes packets errors dropped overrun mcast 13596 172 0 0 0 0 TX: bytes packets errors dropped carrier collsns 13596 172 0 0 0 0 2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 54:04:a6:bf:51:30 brd ff:ff:ff:ff:ff:ff inet 172.20.13.190/25 brd 172.20.13.255 scope global dynamic enp1s0 valid_lft 689168sec preferred_lft 689168sec inet6 fe80::5604:a6ff:febf:5130/64 scope link valid_lft forever preferred_lft forever RX: bytes packets errors dropped overrun mcast 14803843 18402 0 0 0 922 TX: bytes packets errors dropped carrier collsns 3852067 14306 0 0 0 0 |
$ls -la
total 140 drwxr-xr-x 18 user user 4096 Dec 19 10:57 . 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 3613 Dec 18 17:05 .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 638 Dec 17 12:42 .bashrc drwx------ 11 user user 4096 Dec 17 14:32 .cache drwx------ 10 user user 4096 Dec 17 12:17 .config ... drwxr-xr-x 2 user user 4096 Dec 17 12:15 Pictures -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 18 13:00 .ssh -rw------- 1 user user 1766 Dec 19 10:44 ssh-key -rw-r--r-- 1 user user 389 Dec 19 10:44 ssh-key.pub drwxr-xr-x 2 user user 4096 Dec 17 12:15 Templates -rw-r--r-- 1 user user 77 Dec 17 14:45 test.json drwxr-xr-x 2 user user 4096 Dec 17 12:15 Videos -rw------- 1 user user 8544 Dec 18 16:58 .viminfo |
$ssh ec2-34-244-93-14.eu-west-1.compute.amazonaws.com
The authenticity of host 'ec2-34-244-93-14.eu-west-1.compute.amazonaws.com (34.244.93.14)' can't be established. ECDSA key fingerprint is SHA256:27n0OswYVNnP/7/0ij9P5XijtdSgmfv/8SpB+Y+gmdE. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'ec2-34-244-93-14.eu-west-1.compute.amazonaws.com,34.244.93.14' (ECDSA) to the list of known hosts. Permission denied (publickey,gssapi-keyex,gssapi-with-mic). |
$ssh 34.244.93.14
Permission denied (publickey,gssapi-keyex,gssapi-with-mic). |
$ssh-a
ssh-add ssh-agent ssh-argv0 |
$ssh-a
ssh-add ssh-agent ssh-argv0 |
$ssh-add -l
The agent has no identities. |
$ssh-add .ssh/user6.pem
Identity added: .ssh/user6.pem (.ssh/user6.pem) |
$ssh-add -l
2048 SHA256:qClOdNHsFlAJgKgL5rlMuGG8sd7ZcntUunkmDLNPKmw .ssh/user6.pem (RSA) |
$cp .ssh/user6.pem ~/
|
$chmod 600 m7_id_rsa.pub
|
$ssh ec2-34-244-93-14.eu-west-1.compute.amazonaws.com
Permission denied (publickey,gssapi-keyex,gssapi-with-mic). |
$ssh ec2-18-203-127-252.eu-west-1.compute.amazonaws.com
__| __|_ ) _| ( / 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-3-1-112 ~]$ touch .hushlogin [ec2-user@ip-10-3-1-112 ~]$ [ec2-user@ip-10-3-1-112 ~]$ [ec2-user@ip-10-3-1-112 ~]$ ssh -A 10.3.1.154 ... Warning: Permanently added '10.3.1.154' (ECDSA) to the list of known hosts. Permission denied (publickey,gssapi-keyex,gssapi-with-mic). [ec2-user@ip-10-3-1-112 ~]$ [ec2-user@ip-10-3-1-112 ~]$ [ec2-user@ip-10-3-1-112 ~]$ [ec2-user@ip-10-3-1-112 ~]$ exi -bash: exi: command not found [ec2-user@ip-10-3-1-112 ~]$ exit logout Connection to ec2-18-203-127-252.eu-west-1.compute.amazonaws.com closed. |
$ssh-agent -l
unknown option -- l usage: ssh-agent [-c | -s] [-Dd] [-a bind_address] [-E fingerprint_hash] [-P pkcs11_whitelist] [-t life] [command [arg ...]] ssh-agent [-c | -s] -k |
$ssh-add -l
2048 SHA256:qClOdNHsFlAJgKgL5rlMuGG8sd7ZcntUunkmDLNPKmw .ssh/user6.pem (RSA) |
$ssh-add m7_id_rsa.pub
Enter passphrase for m7_id_rsa.pub: Bad passphrase, try again for m7_id_rsa.pub: Bad passphrase, try again for m7_id_rsa.pub: Bad passphrase, try again for m7_id_rsa.pub: Bad passphrase, try again for m7_id_rsa.pub: Bad passphrase, try again for m7_id_rsa.pub: Bad passphrase, try again for m7_id_rsa.pub: Bad passphrase, try again for m7_id_rsa.pub: Bad passphrase, try again for m7_id_rsa.pub: Bad passphrase, try again for m7_id_rsa.pub: Bad passphrase, try again for m7_id_rsa.pub: Bad passphrase, try again for m7_id_rsa.pub: |
$sudo apt-get install python-pip
[sudo] password for user: 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: ... 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 247kB/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 233kB/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 190kB/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) |
$cat .ssh/user6.pem
-----BEGIN RSA PRIVATE KEY----- MIIEogIBAAKCAQEAtAFpvisKzZ7ThStnLj2FErWsZj87wEwHGvkRYAT6OtioVon+TCOMK+kUl2Yw nx8H1XPMTeNAWbPiH0pAWHlZWKNZKMbjbS/HH95dhXxQk2tXQUHuvZAxsEe+bBhb/DPe8P47K40B nfrz+onA7+iGfDurkSb3Z8fYK5F4Nwc+9eBIeEFd6rGp2DUqqLr3wLMxZtVUq77Iyjf2z27sOPbp 1FVgJkpZtMqsoV7WLVgRT+OVPC1J8TYW/Y4rZXiUhjRGrMgtBdWlVKQXECqIe/t8mM2X6EYWMcSJ NteqMg0isuglXTYV3fjBM0sNeBQXPQpKpFvk7TgedUxB1H0582Ee4wIDAQABAoIBACttR9iUQ8f1 sGwpW3xBZVBtOgl06fJrpS8xtapnqQL3cC1on0w5K0EQu2IHSmWpM9egV0LXN5gsmLoZzMpLhG2p AwKecRHPfAfJOuDQbBQUynk48eMT3Zj8xgkIG3EOBpQ3kYjhPOmjOKdSApUekQt5zdt3/iowgYuJ TepguiTRLbrWXX0McMHvILOAPsCTsgpO+jTTPtzZOn9QIHrfW3DJnfITTSS9nxsaM30+AkoX0LKR uznM0hhbM8x6sDBOW7F7ijLoBAePx04/FTVaqoEzwUk8kUMSAVsw58CX0SKKJWRLewOS4FNNG59H ... RI1pNsVDdkW61TFtBf6WZwZwrk0Rn/7LVY1yPEOB2IxJXK8TVUkCgYEAuw/VtAooQ6NhKCpAGIDL mdTY82dFC0FSPRCOVbpUePu4L4K99nEuwkv09FhcNcvjE+pOhru14rkAPSZyK5vNEdMkl5swSuWJ zln8G7rO0Dj1hPeZkwlWdRbFPjFyTL8KUU4IKQBizSi7uhwn5pVaLi/1EOzGEFobeYbusp3OjssC gYBcYYwTvJrpTXVEr8nnR4Ln31XMnmmHnSG+FDiXrUoJQL6asqt/rGFt1opA9x5vw4UTanhtLLCf j4jSfoZBpJjGVu5mIptbNfUxP07hqb30b0lxNJJUdCRDl2t5TNK1IHrxIqszAisRgWzjy+174BkI +CNGvRmm8eYC0HE+mcVVSQKBgE1xVMvgmKLH9OUn+LksOR5KnDbIvjDWrjFRtVuQdIBR1gL1Yaex W+Zcg+DU4/fxnOUVz8S/2aEvbgXi8MlVCyUiALgzK18WgGLJpjHkuNJDgoG18AKLjxuSfb4twmA7 hw35/C7dVgoRnwaBuZMgqeENQavsGmOSqmU5k4CnDGjZAoGASP3b3usV+W/qvWtSA+dXKcqQXWXR ncfWGV1RsqW84trnOlaEMPUp+NZtBajACPaqEyWSOJRw5Z+BQKdp5fSWEf8YjYdrNT81bmHrS89F 5y0V5epXr6AkIlmpIDmrwosOTdfk67ZTlzBCx+yCI7XyZwMI+4HP4+8aWb6AyPcYmq0= |
$ls -la
total 140 drwxr-xr-x 18 user user 4096 Dec 19 11:22 . 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 3660 Dec 19 14:17 .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 638 Dec 17 12:42 .bashrc drwx------ 11 user user 4096 Dec 17 14:32 .cache drwx------ 10 user user 4096 Dec 17 12:17 .config ... drwxr-xr-x 2 user user 4096 Dec 17 12:15 Pictures -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 18 13:00 .ssh -rw------- 1 user user 1766 Dec 19 10:44 ssh-key -rw-r--r-- 1 user user 389 Dec 19 10:44 ssh-key.pub drwxr-xr-x 2 user user 4096 Dec 17 12:15 Templates -rw-r--r-- 1 user user 77 Dec 17 14:45 test.json drwxr-xr-x 2 user user 4096 Dec 17 12:15 Videos -rw------- 1 user user 8544 Dec 18 16:58 .viminfo |
$cat credentials.csv
user6,tk=l#erR3XY8,AKIAJO7Q5VCMZGOFCKXQ,xDZdIa4RXgL86vMHs1L8u1ufZMSbv81rK0D/zGMm,https://chubin.signin.aws.amazon.com/console |
$cat credentials.csv -n
1 user6,tk=l#erR3XY8,AKIAJO7Q5VCMZGOFCKXQ,xDZdIa4RXgL86vMHs1L8u1ufZMSbv81rK0D/zGMm,https://chubin.signin.aws.amazon.com/console |
1 user6,tk=l#erR3XY8,AKIAJO7Q5VCMZGOFCKXQ,xDZdIa4RXgL86vMHs1L8u1ufZMSbv81rK0D/zGMm,https://chubin.signin.aws.amazon.com/console
Host *.compute.amazonaws.com IdentityFile ~/.ssh/user6.pem User ec2-user
-----BEGIN RSA PRIVATE KEY----- MIIEogIBAAKCAQEAtAFpvisKzZ7ThStnLj2FErWsZj87wEwHGvkRYAT6OtioVon+TCOMK+kUl2Yw nx8H1XPMTeNAWbPiH0pAWHlZWKNZKMbjbS/HH95dhXxQk2tXQUHuvZAxsEe+bBhb/DPe8P47K40B nfrz+onA7+iGfDurkSb3Z8fYK5F4Nwc+9eBIeEFd6rGp2DUqqLr3wLMxZtVUq77Iyjf2z27sOPbp 1FVgJkpZtMqsoV7WLVgRT+OVPC1J8TYW/Y4rZXiUhjRGrMgtBdWlVKQXECqIe/t8mM2X6EYWMcSJ NteqMg0isuglXTYV3fjBM0sNeBQXPQpKpFvk7TgedUxB1H0582Ee4wIDAQABAoIBACttR9iUQ8f1 sGwpW3xBZVBtOgl06fJrpS8xtapnqQL3cC1on0w5K0EQu2IHSmWpM9egV0LXN5gsmLoZzMpLhG2p AwKecRHPfAfJOuDQbBQUynk48eMT3Zj8xgkIG3EOBpQ3kYjhPOmjOKdSApUekQt5zdt3/iowgYuJ TepguiTRLbrWXX0McMHvILOAPsCTsgpO+jTTPtzZOn9QIHrfW3DJnfITTSS9nxsaM30+AkoX0LKR uznM0hhbM8x6sDBOW7F7ijLoBAePx04/FTVaqoEzwUk8kUMSAVsw58CX0SKKJWRLewOS4FNNG59H 69v27mnlOK1/4F1bnAYRrMd8XHECgYEA9lfa+SSOrkSAzwtUH04dA2NGFyWoAPxrp3DTSDGZYoO4 6eugvJMMEx+36hk4zxhkpse4KnfeNlqFaVp+ZHaP4P+J+WgVj0oC+IQUTQuG3GZZRbdPhJKLDdcD RI1pNsVDdkW61TFtBf6WZwZwrk0Rn/7LVY1yPEOB2IxJXK8TVUkCgYEAuw/VtAooQ6NhKCpAGIDL mdTY82dFC0FSPRCOVbpUePu4L4K99nEuwkv09FhcNcvjE+pOhru14rkAPSZyK5vNEdMkl5swSuWJ zln8G7rO0Dj1hPeZkwlWdRbFPjFyTL8KUU4IKQBizSi7uhwn5pVaLi/1EOzGEFobeYbusp3OjssC gYBcYYwTvJrpTXVEr8nnR4Ln31XMnmmHnSG+FDiXrUoJQL6asqt/rGFt1opA9x5vw4UTanhtLLCf j4jSfoZBpJjGVu5mIptbNfUxP07hqb30b0lxNJJUdCRDl2t5TNK1IHrxIqszAisRgWzjy+174BkI +CNGvRmm8eYC0HE+mcVVSQKBgE1xVMvgmKLH9OUn+LksOR5KnDbIvjDWrjFRtVuQdIBR1gL1Yaex W+Zcg+DU4/fxnOUVz8S/2aEvbgXi8MlVCyUiALgzK18WgGLJpjHkuNJDgoG18AKLjxuSfb4twmA7 hw35/C7dVgoRnwaBuZMgqeENQavsGmOSqmU5k4CnDGjZAoGASP3b3usV+W/qvWtSA+dXKcqQXWXR ncfWGV1RsqW84trnOlaEMPUp+NZtBajACPaqEyWSOJRw5Z+BQKdp5fSWEf8YjYdrNT81bmHrS89F 5y0V5epXr6AkIlmpIDmrwosOTdfk67ZTlzBCx+yCI7XyZwMI+4HP4+8aWb6AyPcYmq0=
user6,tk=l#erR3XY8,AKIAJO7Q5VCMZGOFCKXQ,xDZdIa4RXgL86vMHs1L8u1ufZMSbv81rK0D/zGMm,https://chubin.signin.aws.amazon.com/console
Время первой команды журнала | 14:27:33 2018-12-17 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 12:26:05 2018-12-19 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 27.72 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 2.97 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 2.42 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 0.70 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008