Журнал лабораторных работ

Содержание

Журнал

Вторник (09/19/06)

/dev/pts/7
17:21:01
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:04:76:A1:EF:BB
          inet addr:192.168.16.1  Bcast:192.168.16.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:935540 errors:0 dropped:0 overruns:1 frame:0
          TX packets:598310 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:964048319 (919.3 MiB)  TX bytes:51650706 (49.2 MiB)
          Interrupt:17 Base address:0xc000
eth1      Link encap:Ethernet  HWaddr 00:60:08:20:7B:0B
          inet addr:192.168.16.2  Bcast:192.168.16.255  Mask:255.255.255.0
...
          collisions:0 txqueuelen:1000
          RX bytes:1806957 (1.7 MiB)  TX bytes:2464867 (2.3 MiB)
          Interrupt:16 Base address:0xc400
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:23444 errors:0 dropped:0 overruns:0 frame:0
          TX packets:23444 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:51791621 (49.3 MiB)  TX bytes:51791621 (49.3 MiB)
17:21:04
#p[ing mail.ru
>
17:21:10
#ping mail.ru

17:21:15
#route add defaul gw 192.168.15.254
defaul: Host name lookup failure
17:21:35
#route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.16.0    0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.16.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.16.1    0.0.0.0         UG    0      0        0 eth1
17:21:45
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:04:76:A1:EF:BB
          inet addr:192.168.16.1  Bcast:192.168.16.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:935597 errors:0 dropped:0 overruns:1 frame:0
          TX packets:598310 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:964052089 (919.3 MiB)  TX bytes:51650706 (49.2 MiB)
          Interrupt:17 Base address:0xc000
eth1      Link encap:Ethernet  HWaddr 00:60:08:20:7B:0B
          inet addr:192.168.16.2  Bcast:192.168.16.255  Mask:255.255.255.0
...
          collisions:0 txqueuelen:1000
          RX bytes:1807077 (1.7 MiB)  TX bytes:2467208 (2.3 MiB)
          Interrupt:16 Base address:0xc400
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:23444 errors:0 dropped:0 overruns:0 frame:0
          TX packets:23444 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:51791621 (49.3 MiB)  TX bytes:51791621 (49.3 MiB)
17:21:57
#/etc/init.d/networking restart
Setting up IP spoofing protection: rp_filter.
Enabling packet forwarding...done.
Reconfiguring network interfaces...SIOCDELRT: No such process
done.
17:22:17
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:04:76:A1:EF:BB
          inet addr:192.168.15.4  Bcast:192.168.15.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:935637 errors:0 dropped:0 overruns:1 frame:0
          TX packets:598312 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:964055933 (919.3 MiB)  TX bytes:51650826 (49.2 MiB)
          Interrupt:17 Base address:0xc000
eth1      Link encap:Ethernet  HWaddr 00:60:08:20:7B:0B
          inet addr:192.168.16.2  Bcast:192.168.16.255  Mask:255.255.255.0
...
          collisions:0 txqueuelen:1000
          RX bytes:1807137 (1.7 MiB)  TX bytes:2472778 (2.3 MiB)
          Interrupt:16 Base address:0xc400
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:23444 errors:0 dropped:0 overruns:0 frame:0
          TX packets:23444 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:51791621 (49.3 MiB)  TX bytes:51791621 (49.3 MiB)
17:22:19
#/etc/init.d/networking restart
Setting up IP spoofing protection: rp_filter.
Enabling packet forwarding...done.
Reconfiguring network interfaces...done.
17:22:22
#ifconfig
eth0      Link encap:Ethernet  HWaddr 00:04:76:A1:EF:BB
          inet addr:192.168.15.4  Bcast:192.168.15.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:935642 errors:0 dropped:0 overruns:1 frame:0
          TX packets:598317 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:964056604 (919.3 MiB)  TX bytes:51652614 (49.2 MiB)
          Interrupt:17 Base address:0xc000
eth1      Link encap:Ethernet  HWaddr 00:60:08:20:7B:0B
          inet addr:192.168.16.2  Bcast:192.168.16.255  Mask:255.255.255.0
...
          collisions:0 txqueuelen:1000
          RX bytes:1807137 (1.7 MiB)  TX bytes:2472778 (2.3 MiB)
          Interrupt:16 Base address:0xc400
lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:23444 errors:0 dropped:0 overruns:0 frame:0
          TX packets:23444 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:51791621 (49.3 MiB)  TX bytes:51791621 (49.3 MiB)
17:22:24
#ifconfig eth1 192.168.16.1

17:22:36
#iptables -t nat -A POSTROUTING -s 192.168.16.2 -j MASQUERADE

17:23:26
#iptables -t nat -I PREROUTING --dport 22000 --to 192.168.16.2:22 -j DNAT
iptables v1.2.11: Unknown arg `--dport'
Try `iptables -h' or 'iptables --help' for more information.
17:24:27
#iptables -t nat -I PREROUTING -p tcp --dport 22000 --to 192.168.16.2:22 -j DNAT
iptables v1.2.11: Unknown arg `--to'
Try `iptables -h' or 'iptables --help' for more information.
17:24:42
#iptables -t nat -I PREROUTING -p tcp --dport 22000 -j DNAT --to 192.168.16.2:22

17:25:57
#ping 192.168.16.1
PING 192.168.16.1 (192.168.16.1) 56(84) bytes of data.
64 bytes from 192.168.16.1: icmp_seq=1 ttl=64 time=0.080 ms
--- 192.168.16.1 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.080/0.080/0.080/0.000 ms
17:26:06
#ping 192.168.16.2
PING 192.168.16.2 (192.168.16.2) 56(84) bytes of data.
64 bytes from 192.168.16.2: icmp_seq=1 ttl=64 time=0.187 ms
--- 192.168.16.2 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.187/0.187/0.187/0.000 ms
17:26:08
#ssh user@192.168.15.254
The authenticity of host '192.168.15.254 (192.168.15.254)' can't be established.
RSA key fingerprint is 6f:48:13:41:a9:66:cb:02:0a:ca:65:38:70:45:79:d7.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.15.254' (RSA) to the list of known hosts.
Password:
Linux herz.linux.nt 2.6.17-prexen #3 PREEMPT Thu Aug 10 00:28:25 EEST 2006 i686
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
...
   http://www.FreeBSD.org/search/.  If the doc distribution has
   been installed, they're also available formatted in /usr/share/doc.
If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and
configuration utility.  Edit /etc/motd to change this login announcement.
l3-agent is already running: pid=5228; pidfile=/root/.lilalo/l3-agent.pid
iptables -t nat -I PREROUTING -p tcp --dport 22000 -j DNAT --to 192.168.16.2:22
17:27:32
#wall
PRIVET
Broadcast Message from root@fbsd1.unix.nt
        (/dev/ttypf) at 17:27 EEST...
PRIVET
17:27:50
#w
 5:28PM  up  6:41, 7 users, load averages: 1.17, 1.08, 1.02
USER             TTY      FROM              LOGIN@  IDLE WHAT
user             v1       -                10:47AM    56 script -t 0 -q /home/user/.lilalo//14422206902233719322-1158652047.script
user             v2       -                10:52AM  6:20 script -t 0 -q /home/user/.lilalo//156725469181838117-1158652329.script
user             p4       :0.0             11:08AM     - script -t 0 -q /home/user/.lilalo//2722418005330623841-1158653298.script
user             p6       :0.0             11:08AM  2:18 script -t 0 -q /home/user/.lilalo//23532284121135324257-1158653305.script
user             p9       :0.0              5:06PM     - script -t 0 -q /home/user/.lilalo//14860271651106012414-1158674805.script
user             pb       :0.0              5:25PM     2 script -t 0 -q /home/user/.lilalo//15733255912311731776-1158675916.script
root             pd       192.168.15.254    5:27PM     - script -t 0 -q /root/.lilalo//212326249218336935-1158676052.script
17:28:00
#exit
Connection to 192.168.15.4 closed.
user@herz:~$ logout
Connection to 192.168.15.254 closed.
проброс портов
iptables -t nat -A POSTROUTING -s 192.168.16.2 -j MASQUERADE
настройка NAT
17:29:17
#exit

/dev/pts/1
17:33:49
$ls -lh
итого 590M
-rw-r--r--  1 user user  17K 2006-09-18 17:51 1369644?refer=1358835
drwx------  2 user user 4,0K 2006-08-03 18:00 Desktop
drwx------  2 user user 4,0K 2006-09-07 13:26 Mail
-rw-------  1 user user 5,1K 2006-09-11 19:57 mbox
-rw-r--r--  1 user user   35 2006-09-09 18:41 minicom.log
-rw-r--r--  1 user user 585M 2006-07-22 17:32 Samba.rar
-rw-------  1 user user 2,2K 2006-09-12 16:26 sent
-rw-r--r--  1 user user 4,4M 2006-08-03 17:28 Shell_unix.djvu
17:33:52
$wget http://217.20.170.49/info/1369481/archive_001.rar
--18:00:42--  http://217.20.170.49/info/1369481/archive_001.rar
           => `archive_001.rar'
Установка соединения с 217.20.170.49:80... соединились.
Запрос HTTP послан, ожидание ответа... 200 OK
Длина: 89,520,956 [application/rar]
прошло 30 минут
/dev/pts/7
18:04:10
$wget http://217.20.170.49/info/1369466/Latin%20Unlimited.%20Cafe%20Paradiso.rar
--18:05:34--  http://217.20.170.49/info/1369466/Latin%20Unlimited.%20Cafe%20Paradiso.rar
           => `Latin Unlimited. Cafe Paradiso.rar'
Установка соединения с 217.20.170.49:80... соединились.
Запрос HTTP послан, ожидание ответа... 200 OK
Длина: 82,116,040 [application/rar]
/dev/pts/5
18:05:50
$wget http://217.20.170.49/info/1355279/cha-cha-cha.rar
--18:08:36--  http://217.20.170.49/info/1355279/cha-cha-cha.rar
           => `cha-cha-cha.rar'
Установка соединения с 217.20.170.49:80... соединились.
Запрос HTTP послан, ожидание ответа... 200 OK
Длина: 76,749,678 [application/rar]
прошла 61 минута
/dev/pts/1
19:07:36
$[user@linux4:user]$ su -
Password:
l3-agent is already running: pid=4645; pidfile=/root/.lilalo/l3-agent.pid
/dev/pts/5
19:07:40
$ls -lh
итого 729M
-rw-r--r--  1 user user  16K 2006-09-19 19:07 1355279?isbot=1
-rw-r--r--  1 user user  16K 2006-09-19 19:07 1369466?isbot=1
-rw-r--r--  1 user user  16K 2006-09-19 19:07 1369481?isbot=1
-rw-r--r--  1 user user  17K 2006-09-18 17:51 1369644?refer=1358835
-rw-r--r--  1 user user  51M 2006-09-19 19:06 archive_001.rar
-rw-r--r--  1 user user  43M 2006-09-19 19:07 cha-cha-cha.rar
drwx------  2 user user 4,0K 2006-08-03 18:00 Desktop
-rw-r--r--  1 user user  46M 2006-09-19 19:07 Latin Unlimited. Cafe Paradiso.rar
drwx------  2 user user 4,0K 2006-09-07 13:26 Mail
-rw-------  1 user user 5,1K 2006-09-11 19:57 mbox
-rw-r--r--  1 user user   35 2006-09-09 18:41 minicom.log
-rw-r--r--  1 user user 585M 2006-07-22 17:32 Samba.rar
-rw-------  1 user user 2,2K 2006-09-12 16:26 sent
-rw-r--r--  1 user user 4,4M 2006-08-03 17:28 Shell_unix.djvu
/dev/pts/7
19:07:48
$[user@linux4:user]$ ssh root@192.168.15.2
Password:
Last login: Wed Sep 20 09:57:46 2006
Linux linux2.linux.nt 2.4.27-speakup #1 Thu Aug 19 21:46:14 CEST 2004 i686
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.
No mail.
l3-agent is already running: pid=3349; pidfile=/root/.lilalo/l3-agent.pid

Среда (09/20/06)

/dev/pts/1
09:56:38
#apt-get install sim
Reading Package Lists... Done
Building Dependency Tree... Done
Package sim is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  kopete
E: Package sim has no installation candidate
ssh user@fbsd1.unix.nt
/dev/pts/7
09:57:56
#screen -x
/dev/pts/1
09:59:30
#The authenticity of host 'fbsd1.unix.nt (192.168.15.21)' can't be established.
> DSA key fingerprint is 93:b0:4b:c7:17:ef:94:32:32:00:84:56:96:77:0c:65.
> Are you sure you want to continue connecting (yes/no)
>
Отпечаток откр ключа 93:b0:4b:c7:17:ef:94:32:32:00:84:56:96:77:0c:65
механизм опр подлинности открытыми ключами
Асим и симметричное шифрование ...
Открытый и закрытый ключи...зис...
проверка отпечатка ssh-keygen -lf /etc/ssh/ssh_host_dsa_key.pub
10:04:10
#ssh-keygen -lf /etc/ssh/ssh_host_dsa_key.pub
1024 76:66:1a:67:94:f1:6f:aa:db:69:59:23:92:4b:b2:b7 /etc/ssh/ssh_host_dsa_key.pub
10:04:17
#cat ssh-keygen -lf /etc/ssh/ssh_host_dsa_key.pub
cat: invalid option -- l
Попробуйте `cat --help' для получения более подробного описания.
10:04:41
#cat /etc/ssh/ssh_host_dsa_key.pub
ssh-dss AAAAB3NzaC1kc3MAAACBAORwtr+rj/Eru3r0y8o8lJYSXJTE9eFmZg44ovCcRcECMvF5N6o5shdbAq/QcxFyGt4eYzIHxZULGqbgeHCB4eHWIqiYe2MnhDrs/vZLERNnQphFg792M1bNE0mqI7+8wPA4AXNc11zv0us/CTgztkd1OBDB2vnuY35r0Z4k7rqxAAAAFQCWSrFmAZuN0+THzurvqVVVFcfbCwAAAIBIA9YXZEGV6BRfry6p9wAtlELjI3x9ZAYKC3g81lFjV3Wc0C4BziyWN+1P6GQbwSULnBoTBdLnnqdGOmBPvladVnc3ot3hneWfFzWV39qdGaID1AmRnIpv7VOQQ92/eh1CC9HRLtIbddklv5xxjt5BJ9RfAQEjye/K
Отпечаток вычисляестся на основе самого ключа
Рис - определения подлинности сервера
.ssh/known_hosts
ssh user@fbsd1.unix.nt
ssh user@fbsd1.unix.nt hostname
прошло 12 минут
10:16:46
#ssh user@fbsd1.unix.nt date
The authenticity of host 'fbsd1.unix.nt (192.168.15.21)' can't be established.
DSA key fingerprint is 93:b0:4b:c7:17:ef:94:32:32:00:84:56:96:77:0c:65.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'fbsd1.unix.nt,192.168.15.21' (DSA) to the list of known hosts.
Password:
Password:
ÓÒÅÄÁ, 20 ÓÅÎÔÑÂÒÑ 2006 Ç. 10:18:45 (EEST)
10:17:50
#ssh user@fbsd1.unix.nt LANG=C date
Password:
Password:
Wed Sep 20 10:19:01 EEST 2006
10:18:06
# echo privet | ssh user@fbsd1.unix.nt 'cat > /tmp/file2'
Password:
Password:
Передача данных поверх ssh
С ключом -С - сжатие данных
tar c /etc | ssh user@fbsd1.unix.nt tar xC /tmp - Linux
tar c /etc | ssh user@fbsd1.unix.nt tar xfC - /tmp ;"-" --> Читать с stdin
dd if=/dev/hda | ssh root@fbsd1.unix.nt dd of=/dev/ad0
прошло 15 минут
10:33:37
#ssh root@nikolaev dd if=/dev/hda | ssh root@kherson dd of=/d
ssh: kherson: Name or service not known
ssh: nikolaev: Name or service not known
/dev/pts/6
10:33:53
$su -
Password:
l3-agent is already running: pid=4645; pidfile=/root/.lilalo/l3-agent.pid
10:33:59
#apt-get install licq
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
  licq-plugin-qt
Recommended packages:
  sox
The following NEW packages will be installed:
  licq licq-plugin-qt
0 upgraded, 2 newly installed, 0 to remove and 801 not upgraded.
Need to get 2384kB of archives.
...
Get:1 http://debian.org.ua testing/main licq-plugin-qt 1.3.2-6 [1731kB]
Get:2 http://debian.org.ua testing/main licq 1.3.2-6 [653kB]
Fetched 2384kB in 15s (158kB/s)
Выбор ранее не выбранного пакета licq-plugin-qt.
(Чтение базы данных... на данный момент установлено 102975 файлов и каталогов.)
Распаковывается пакет licq-plugin-qt (из файла .../licq-plugin-qt_1.3.2-6_i386.deb)...
Выбор ранее не выбранного пакета licq.
Распаковывается пакет licq (из файла .../archives/licq_1.3.2-6_i386.deb)...
Настраивается пакет licq-plugin-qt (1.3.2-6) ...
Настраивается пакет licq (1.3.2-6) ...
ssh root@nikolaev dd if=/dev/hda | ssh root@kherson dd of=/d
Данные пойдут из Николаева в Киев и потом в Херсон
ssh root@nikolaev 'dd if=/dev/hda | ssh root@kherson dd of=
ssh root@nikolaev 'dd if=/dev/hda | ssh root@kherson dd of=/dev/hda'
То что в ' ' будет выполнено в Николаеве
/dev/pts/1
10:39:22
#ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
The key fingerprint is:
bb:97:54:f5:cc:59:bf:a7:90:be:97:5e:e3:cc:bb:44 root@linux4.linux.nt
10:41:06
#cat ~/.ssh/id_dsa.pub | ssh user@fbsd1.unix.nt 'cat >> ~/.ssÑh/authorized_keys'
Password:
Password:
10:42:22
#ssh user@fbsd1.unix.nt
Last login: Wed Sep 20 10:40:05 2006 from linux2.linux.nt
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 6.0-RELEASE (MYKERN) #0: Tue Sep 19 10:31:16 EEST 2006
Welcome to FreeBSD!
Before seeking technical support, please use the following resources:
o  Security advisories and updated errata information for all releases are
   at http://www.FreeBSD.org/releases/ - always consult the ERRATA section
   for your release first as it's updated frequently.
o  The Handbook and FAQ documents are at http://www.FreeBSD.org/ and,
   along with the mailing lists, can be searched by going to
   http://www.FreeBSD.org/search/.  If the doc distribution has
   been installed, they're also available formatted in /usr/share/doc.
If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and
configuration utility.  Edit /etc/motd to change this login announcement.
l3-agent is already running: pid=5512; pidfile=/home/user/.lilalo/l3-agent.pid
10:42:39
#cat ~/.ssh/id_dsa.pub | ssh root@fbsd1.unix.nt 'cat >> ~/.ssh/authorized_keys'
Password:
10:42:50
#ssh root@fbsd1.unix.nt
Last login: Wed Sep 20 10:03:49 2006 from 192.168.15.254
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 6.0-RELEASE (MYKERN) #0: Tue Sep 19 10:31:16 EEST 2006
Welcome to FreeBSD!
Before seeking technical support, please use the following resources:
o  Security advisories and updated errata information for all releases are
   at http://www.FreeBSD.org/releases/ - always consult the ERRATA section
   for your release first as it's updated frequently.
o  The Handbook and FAQ documents are at http://www.FreeBSD.org/ and,
   along with the mailing lists, can be searched by going to
   http://www.FreeBSD.org/search/.  If the doc distribution has
   been installed, they're also available formatted in /usr/share/doc.
If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and
configuration utility.  Edit /etc/motd to change this login announcement.
l3-agent is already running: pid=5228; pidfile=/root/.lilalo/l3-agent.pid
10:43:03
# ssh user@192.168.51.4 'echo Privet | wall'

10:43:33
$exit
Connection to fbsd1.unix.nt closed.
10:43:57
#exit
Connection to fbsd1.unix.nt closed.
10:47:47
# ssh user@192.168.15.4 'echo Privet | wall'
The authenticity of host '192.168.15.4 (192.168.15.4)' can't be established.
RSA key fingerprint is d2:cc:15:93:90:6c:51:24:19:0e:37:1d:2b:04:db:4a.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.15.4' (RSA) to the list of known hosts.
Password:
10:47:57
#cat ~/.ssh/id_dsa.pub | ssh root@fbsd1.unix.nt 'cat >> ~/.ssh/authorized_keys'

Одна парольная фраза на все ключи
10:53:50
#ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/root/.ssh/id_dsa):
/root/.ssh/id_dsa already exists.
Overwrite (y/n)? Ðy
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_dsa.
Your public key has been saved in /root/.ssh/id_dsa.pub.
The key fingerprint is:
02:51:8e:ba:4f:35:e4:b0:1c:74:9a:a7:1f:5e:88:0b root@linux4.linux.nt
10:54:26
#cat ~/.ssh/id_dsa.pub | ssh root@fbsd1.unix.nt 'cat >> ~/.ssh/authorized_keys'
Password:
10:54:43
#eval $(ssh-agent)
Agent pid 17790
10:54:58
#ssh-a
ssh-add    ssh-agent  ssh-argv0
10:54:58
#ssh-add
Enter passphrase for /root/.ssh/id_dsa:
Identity added: /root/.ssh/id_dsa (/root/.ssh/id_dsa)
10:55:19
#ssh-add -l
1024 02:51:8e:ba:4f:35:e4:b0:1c:74:9a:a7:1f:5e:88:0b /root/.ssh/id_dsa (DSA)
10:55:24
#ssh fbsd1.unix.nt
Last login: Wed Sep 20 10:43:56 2006 from 192.168.15.4
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 6.0-RELEASE (MYKERN) #0: Tue Sep 19 10:31:16 EEST 2006
Welcome to FreeBSD!
Before seeking technical support, please use the following resources:
o  Security advisories and updated errata information for all releases are
   at http://www.FreeBSD.org/releases/ - always consult the ERRATA section
   for your release first as it's updated frequently.
o  The Handbook and FAQ documents are at http://www.FreeBSD.org/ and,
   along with the mailing lists, can be searched by going to
   http://www.FreeBSD.org/search/.  If the doc distribution has
   been installed, they're also available formatted in /usr/share/doc.
If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and
configuration utility.  Edit /etc/motd to change this login announcement.
l3-agent is already running: pid=5228; pidfile=/root/.lilalo/l3-agent.pid
Запуск агента gent)
Добавление фразы для ключей ssh-add
10:56:39
#exit
Connection to fbsd1.unix.nt closed.
Добавление фЗапуÑ#^ Просмотр запомненных парольных фраз
Запуск агента eval $(ssh-agent)
Добавление фразы для ключей ssh-add
Просмотр запомненных парольных фраз ssh-add -l
/dev/pts/6
10:59:38
#дless /etc/console
console                   console-cyrillic          console-cyrillic.debconf  console-tools
10:59:38
#less /etc/console-tools/
10:59:38
#less /etc/console-tools/config
11:04:49
#setleds +num
KDGETLED: Invalid argument
Error reading current led setting. Maybe stdin is not a VT?
11:04:54
#setleds +num < /dev/tty0

11:05:01
#exit

прошло 52 минуты
11:57:05
$xhost +192.168.15.21
192.168.15.21 being added to access control list
11:57:16
$ssh user@192.168.15.21
Password:
Last login: Wed Sep 20 11:28:02 2006 from 192.168.15.254
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 6.0-RELEASE (MYKERN) #0: Tue Sep 19 10:31:16 EEST 2006
Welcome to FreeBSD!
Before seeking technical support, please use the following resources:
o  Security advisories and updated errata information for all releases are
   at http://www.FreeBSD.org/releases/ - always consult the ERRATA section
   for your release first as it's updated frequently.
...
   http://www.FreeBSD.org/search/.  If the doc distribution has
   been installed, they're also available formatted in /usr/share/doc.
If you still have a question or problem, please take the output of
`uname -a', along with any relevant error messages, and email it
as a question to the questions@FreeBSD.org mailing list.  If you are
unfamiliar with FreeBSD's directory layout, please refer to the hier(7)
manual page.  If you are not familiar with manual pages, type `man man'.
You may also use sysinstall(8) to re-enter the installation and
configuration utility.  Edit /etc/motd to change this login announcement.
l3-agent is already running: pid=3882; pidfile=/home/user/.lilalo/l3-agent.pid
/dev/pts/7
11:58:15
#netstat -ln | grep 6000

/dev/pts/6
11:58:25
$DISPLAY=192.168.15.4 xclock
Error: Can't open display: 192.168.15.4

Файлы

  • /etc/ssh/ssh_host_dsa_key.pub
  • /etc/ssh/ssh_host_dsa_key.pub
    >
    ssh-dss AAAAB3NzaC1kc3MAAACBAORwtr+rj/Eru3r0y8o8lJYSXJTE9eFmZg44ovCcRcECMvF5N6o5shdbAq/QcxFyGt4eYzIHxZULGqbgeHCB4eHWIqiYe2MnhDrs/vZLERNnQphFg792M1bNE0mqI7+8wPA4AXNc11zv0us/CTgztkd1OBDB2vnuY35r0Z4k7rqxAAAAFQCWSrFmAZuN0+THzurvqVVVFcfbCwAAAIBIA9YXZEGV6BRfry6p9wAtlELjI3x9ZAYKC3g81lFjV3Wc0C4BziyWN+1P6GQbwSULnBoTBdLnnqdGOmBPvladVnc3ot3hneWfFzWV39qdGaID1AmRnIpv7VOQQ92/eh1CC9HRLtIbddklv5xxjt5BJ9RfAQEjye/K
    

    Статистика

    Время первой команды журнала17:21:01 2006- 9-19
    Время последней команды журнала11:58:25 2006- 9-20
    Количество командных строк в журнале69
    Процент команд с ненулевым кодом завершения, %17.39
    Процент синтаксически неверно набранных команд, % 0.00
    Суммарное время работы с терминалом *, час 1.41
    Количество командных строк в единицу времени, команда/мин 0.82
    Частота использования команд
    #^30|=======================| 23.62%
    ssh21|================| 16.54%
    cat6|====| 4.72%
    exit6|====| 4.72%
    ifconfig5|===| 3.94%
    iptables4|===| 3.15%
    >4|===| 3.15%
    authorized_keys'4|===| 3.15%
    ping3|==| 2.36%
    wget3|==| 2.36%
    ssh-keygen3|==| 2.36%
    setleds2|=| 1.57%
    apt-get2|=| 1.57%
    ls2|=| 1.57%
    /etc/init.d/networking2|=| 1.57%
    ssh-add2|=| 1.57%
    route2|=| 1.57%
    [user@linux4:user]$2|=| 1.57%
    wall'2|=| 1.57%
    less2|=| 1.57%
    screen1|| 0.79%
    Читать1|| 0.79%
    xhost1|| 0.79%
    file2'1|| 0.79%
    #^iptables1|| 0.79%
    p[ing1|| 0.79%
    eval1|| 0.79%
    echo1|| 0.79%
    [root@linux4:root]#1|| 0.79%
    netstat1|| 0.79%
    tty01|| 0.79%
    wall1|| 0.79%
    w1|| 0.79%
    The1|| 0.79%
    "-"1|| 0.79%
    DISPLAY=192.168.15.41|| 0.79%
    grep1|| 0.79%
    ssh-a1|| 0.79%
    дless1|| 0.79%
    su1|| 0.79%
    ____
    *) Интервалы неактивности длительностью 30 минут и более не учитываются

    Справка

    Для того чтобы использовать LiLaLo, не нужно знать ничего особенного: всё происходит само собой. Однако, чтобы ведение и последующее использование журналов было как можно более эффективным, желательно иметь в виду следующее:
    1. В журнал автоматически попадают все команды, данные в любом терминале системы.

    2. Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.

    3. Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
      $ l s-l
      bash: l: command not found
      

    4. Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
      $ test 5 -lt 4
      Обратите внимание на то, что код завершения команды может быть отличен от нуля не только в тех случаях, когда команда была выполнена с ошибкой. Многие команды используют код завершения, например, для того чтобы показать результаты проверки

    5. Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
      $ 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
      

    6. Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
      # id
      uid=0(root) gid=0(root) Gruppen=0(root)
      

    7. Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
      $ vi ~/.bashrc
      2a3,5
      >    if [ -f /usr/local/etc/bash_completion ]; then
      >         . /usr/local/etc/bash_completion
      >        fi
      

    8. Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
      $ patch ~/.bashrc
      В данном случае изменения применяются к файлу ~/.bashrc

    9. Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.

      Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.

    10. Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.

    11. Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора

    12. Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.

    13. Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.

    14. Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:

      $ whoami
      
      user
      
      $ #^ Интересно, кто я?
      
      в журнале это будет выглядеть так:
      $ whoami
      
      user
      
      Интересно, кто я?

    15. Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:

      $ whoami
      
      user
      
      $ cat > /dev/null #^ Интересно, кто я?
      
      Программа whoami выводит имя пользователя, под которым 
      мы зарегистрировались в системе.
      -
      Она не может ответить на вопрос о нашем назначении 
      в этом мире.
      
      В журнале это будет выглядеть так:
      $ whoami
      user
      
      Интересно, кто я?
      Программа whoami выводит имя пользователя, под которым
      мы зарегистрировались в системе.

      Она не может ответить на вопрос о нашем назначении
      в этом мире.
      Для разделения нескольких абзацев между собой используйте символ "-", один в строке.

    16. Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=

    17. Содержимое файла может быть показано в журнале. Для этого его нужно вывести с помощью программы cat. Если вывод команды отметить симоволами #!, содержимое файла будет показано в журнале в специально отведённой для этого секции.
    18. Для того чтобы вставить скриншот интересующего вас окна в журнал, нужно воспользоваться командой l3shot. После того как команда вызвана, нужно с помощью мыши выбрать окно, которое должно быть в журнале.
    19. Команды в журнале расположены в хронологическом порядке. Если две команды давались одна за другой, но на разных терминалах, в журнале они будут рядом, даже если они не имеют друг к другу никакого отношения.
      1
          2
      3   
          4
      
      Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.

    О программе

    LiLaLo (L3) расшифровывается как Live Lab Log.
    Программа разработана для повышения эффективности обучения Unix/Linux-системам.
    (c) Игорь Чубин, 2004-2008

    $Id$