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

Содержание

Журнал

Вторник (06/15/10)

/dev/pts/4
13:26:01
#ssh 192.168.16.4
root@192.168.16.4's password:
/dev/pts/2
13:26:12
#mv ssh_host_dsa_key.pub{,.orig}

13:26:16
#ls
moduli       ssh_host_dsa_key.orig      ssh_host_rsa_key.pub
ssh_config   ssh_host_dsa_key.pub.orig
sshd_config  ssh_host_rsa_key
13:26:18
#scp 192.168.16.254:/etc/ssh/*dsa* .
root@192.168.16.254's password:
ssh_host_dsa_key                              100%  668     0.7KB/s   00:00
ssh_host_dsa_key.pub                          100%  601     0.6KB/s   00:00
/dev/pts/4
13:26:19
#ssh -v192.168.16.4
OpenSSH_4.5p1 FreeBSD-20061110, OpenSSL 0.9.7e-p1 25 Oct 2004
ssh: illegal option -- 9
usage: ssh [-1246AaCfgkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]
           [-D [bind_address:]port] [-e escape_char] [-F configfile]
           [-i identity_file] [-L [bind_address:]port:host:hostport]
           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
           [-R [bind_address:]port:host:hostport] [-S ctl_path]
           [-w local_tun[:remote_tun]] [user@]hostname [command]
13:26:23
#ssh -v 192.168.16.4
OpenSSH_4.5p1 FreeBSD-20061110, OpenSSL 0.9.7e-p1 25 Oct 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to 192.168.16.4 [192.168.16.4] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type 1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3p1 Debian-3
debug1: match: OpenSSH_5.3p1 Debian-3 pat OpenSSH*
...
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Offering public key: /root/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Next authentication method: password
root@192.168.16.4's password:
/dev/pts/2
13:26:34
#ls
moduli       ssh_host_dsa_key       ssh_host_dsa_key.pub.orig
ssh_config   ssh_host_dsa_key.orig  ssh_host_rsa_key
sshd_config  ssh_host_dsa_key.pub   ssh_host_rsa_key.pub
13:26:36
#ssh 192.168.16.21
Password:
Last login: Tue Jun 15 13:57:02 2010 from host206.net.nt
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 6.3-RELEASE (SMP) #0: Wed Jan 16 04:45:45 UTC 2008
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=10856; pidfile=/root/.lilalo/l3-agent.pid
/dev/pts/4
13:26:56
#ssh -vv 192.168.16.4
OpenSSH_4.5p1 FreeBSD-20061110, OpenSSL 0.9.7e-p1 25 Oct 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.16.4 [192.168.16.4] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type '-----END'
debug1: identity file /root/.ssh/id_rsa type 1
...
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Offering public key: /root/.ssh/id_rsa
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /root/.ssh/id_dsa
debug2: we did not send a packet, disable method
debug1: Next authentication method: password
root@192.168.16.4's password:
13:27:04
#ssh 192.168.16.4
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the DSA host key has just been changed.
The fingerprint for the DSA key sent by the remote host is
83:c6:70:6f:8a:7e:8b:e9:e4:53:26:31:28:d6:dc:f0.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending key in /root/.ssh/known_hosts:2
DSA host key for 192.168.16.4 has changed and you have requested strict checking.
Host key verification failed.
13:28:43
#ssh-keygen -R 192.168.16.4
/root/.ssh/known_hosts updated.
Original contents retained as /root/.ssh/known_hosts.old
13:29:31
#ssh 192.168.16.4
The authenticity of host '192.168.16.4 (192.168.16.4)' can't be established.
DSA key fingerprint is 83:c6:70:6f:8a:7e:8b:e9:e4:53:26:31:28:d6:dc:f0.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.16.4' (DSA) to the list of known hosts.
root@192.168.16.4's password:
13:29:39
#ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
/root/.ssh/id_rsa 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_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
17:c7:53:3d:5c:fd:b8:b4:39:1a:eb:b5:77:f5:49:55 root@fbsd1.net.nt
13:30:40
#exit
exit
root@debian4:~# exit
logout
Connection to 192.168.16.4 closed.
13:31:48
#exit
exit
root@debian4:~# exit
logout
Connection to 192.168.16.4 closed.
13:32:21
#ssh 192.168.16.4
Enter passphrase for key '/root/.ssh/id_rsa':
Linux debian4 2.6.26-2-xen-686 #1 SMP Tue Mar 9 20:11:42 UTC 2010 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.
Last login: Fri Jun 11 21:49:06 2010 from debian.net.nt
l3-agent is already running: pid=1293; pidfile=/root/.lilalo/l3-agent.pid
13:32:51
#touch .hushlogin

/dev/pts/7
13:32:51
#touch .hushlogin

/dev/pts/4
13:32:52
#ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-bMX7kX0RBI/agent.34403; export SSH_AUTH_SOCK;
SSH_AGENT_PID=34404; export SSH_AGENT_PID;
echo Agent pid 34404;
13:32:56
#exit
exit
root@debian4:~# exit
logout
Connection to 192.168.16.4 closed.
13:32:59
#eval `ssh-agent`
Agent pid 34436
13:33:03
#exit
exit
root@debian4:~# exit
logout
Connection to 192.168.16.4 closed.
13:33:15
#ssh-add
Enter passphrase for /root/.ssh/id_rsa:
Identity added: /root/.ssh/id_rsa (/root/.ssh/id_rsa)
13:33:25
#exit
exit
root@debian4:~# l3script
13:33:32
#exit
exit
root@debian4:~# exit
logout
Connection to 192.168.16.4 closed.
13:33:40
#ssh 192.168.16.4
Linux debian4 2.6.26-2-xen-686 #1 SMP Tue Mar 9 20:11:42 UTC 2010 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.
Last login: Tue Jun 15 14:30:38 2010 from 192.168.16.21
l3-agent is already running: pid=1293; pidfile=/root/.lilalo/l3-agent.pid
13:33:53
#ssh-agent -h
ssh-agent: illegal option -- h
Usage: ssh-agent [options] [command [args ...]]
Options:
  -c          Generate C-shell commands on stdout.
  -s          Generate Bourne shell commands on stdout.
  -k          Kill the current agent.
  -d          Debug mode.
  -a socket   Bind agent socket to given name.
  -t life     Default identity lifetime (seconds).
13:34:01
#ssh-add -h
ssh-add: illegal option -- h
Usage: ssh-add [options] [file ...]
Options:
  -l          List fingerprints of all identities.
  -L          List public key parameters of all identities.
  -d          Delete identity.
  -D          Delete all identities.
  -x          Lock agent.
  -X          Unlock agent.
  -t life     Set lifetime (in seconds) when adding identities.
  -c          Require confirmation to sign using identities
13:34:12
#ssh-add -x
Enter lock password:
Again:
Agent locked.
13:34:22
#ssh 192.168.16.4
Enter passphrase for key '/root/.ssh/id_rsa':
13:34:38
#ssh-add -X
Enter lock password:
Agent unlocked.
13:34:44
#ssh 192.168.16.4
Linux debian4 2.6.26-2-xen-686 #1 SMP Tue Mar 9 20:11:42 UTC 2010 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.
Last login: Tue Jun 15 14:31:47 2010 from 192.168.16.21
l3-agent is already running: pid=1293; pidfile=/root/.lilalo/l3-agent.pid
13:34:57
#ssh 192.168.16.4
l3-agent is already running: pid=1293; pidfile=/root/.lilalo/l3-agent.pid
13:35:15
#ssh 192.168.16.4
l3-agent is already running: pid=1293; pidfile=/root/.lilalo/l3-agent.pid
13:35:34
#ssh-keygen

13:35:34
#ssh -v192.168.16.4

13:44:08
#ssh 192.168.16.1 'netstat -lnp | grep -q :4444 ; echo $?'
The authenticity of host '192.168.16.1 (192.168.16.1)' can't be established.
DSA key fingerprint is c3:63:ba:ce:d2:fb:24:74:ae:a6:7a:4c:36:89:32:68.
Are you sure you want to continue connecting (yes/no)? yes^C
13:44:40
#ssh 192.168.16.4 'netstat -lnp | grep -q :4444 ; echo $?'
1
13:44:44
#ssh 192.168.16.4 'netstat -lnp | grep -q :22 ; echo $?'
0
13:46:17
#exit
exit
root@debian4:~# exit
logout
Connection to 192.168.16.4 closed.
13:47:02
#vim /etc/hosts.allow
/dev/pts/2
13:47:29
#exit
exit
Connection to 192.168.16.21 closed.
/dev/pts/1
13:47:54
#ssh 192.168.1.6.1
ssh: Could not resolve hostname 192.168.1.6.1: Name or service not known
/dev/pts/4
13:47:55
#:q!

13:47:55
#ssh 192.168.16.4 'netstat -lnp | grep -q :4444 || ssh -f -N -R 4
444:127.0.0.1:22 192.168.16.4'
Host key verification failed.
/dev/pts/1
13:47:56
#ssh 192.168.16.1
root@192.168.16.1's password:
Linux debian1 2.6.26-2-xen-686 #1 SMP Tue Mar 9 20:11:42 UTC 2010 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.
Last login: Tue Jun 15 12:51:33 2010 from debian4.net.nt
l3-agent is already running: pid=1291; pidfile=/root/.lilalo/l3-agent.pid
root@debian1:~# l3script
/dev/pts/4
13:48:00
#ssh 192.168.16.4
l3-agent is already running: pid=1293; pidfile=/root/.lilalo/l3-agent.pid
13:48:25
#ssh 192.168.16.4 'netstat -lnp | grep -q :4444 || ssh -v
OpenSSH_5.3p1 Debian-3, OpenSSL 0.9.8n 24 Mar 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to 192.168.16.4 [192.168.16.4] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/identity type -1
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3p1 Debian-3
...
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: read_passphrase: can't open /dev/tty: No such device or address
Host key verification failed.
13:48:53
#ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
/root/.ssh/id_rsa 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_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
d3:0f:9e:7a:f6:f6:90:66:bf:f6:da:1a:93:86:60:7c root@fbsd1.net.nt
13:49:02
#cat .ssh/id_rsa.pub | ssh 192.168.16.4 'cat >> ~/.ssh/authorized everse-i-search)`cat': cat .ssh/id_rsa.pub | ssh 192.168.16.4 '

13:49:02
#ssh-keygen

13:49:12
#exit
exit
Connection to 192.168.16.21 closed.
/dev/pts/1
13:50:00
#EXIT
l3script: EXIT: команда не найдена
13:50:04
#exit
exit
root@debian1:~# exit
logout
Connection to 192.168.16.1 closed.
13:50:43
#cat .ssh/id_rsa.pub | ssh 192.168.16.21 'cat >> ~/.ssh/authorized_keys'
cat: .ssh/id_rsa.pub: Нет такого файла или каталога
Password:
13:51:07
#ls -l .ssh/
итого 8
-rw-r--r-- 1 root root 1197 Июн 15 14:48 authorized_keys
-rw-r--r-- 1 root root 3068 Июн 14 16:46 known_hosts
13:51:12
#ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
36:2c:14:b1:ba:82:23:92:d4:d0:5a:aa:d2:44:65:08 root@debian4
The key's randomart image is:
+--[ RSA 2048]----+
|E. .o o.         |
|  oo   o         |
| ..o  o          |
| .*  o .         |
| +... . S        |
|o=   . o .       |
|O o .            |
|+. .             |
|                 |
+-----------------+
13:51:18
#cat .ssh/id_rsa.pub | ssh 192.168.16.21 'cat >> ~/.ssh/authorized_keys'
Password:
13:51:23
#netstat -lnp | grep :444

13:51:58
#ssh 192.168.16.21
Last login: Tue Jun 15 14:50:24 2010 from debian4.net.nt
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 6.3-RELEASE (SMP) #0: Wed Jan 16 04:45:45 UTC 2008
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=10856; pidfile=/root/.lilalo/l3-agent.pid
13:52:43
#exit
exit
root@debian4:~# exit
logout
Connection to 127.0.0.1 closed.
13:53:17
#netstat -lnp | grep :444
tcp        0      0 127.0.0.1:4444          0.0.0.0:*               LISTEN      8699/sshd: root
tcp6       0      0 ::1:4444                :::*                    LISTEN      8699/sshd: root
13:54:08
#sockstat -4l
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
root     sshd       35606 7  tcp4   127.0.0.1:4444        *:*
root     xinetd     32631 0  tcp4   *:19                  *:*
root     xdm        980   1  tcp46  *:49152               *:*
root     Xorg       979   3  tcp4   *:6000                *:*
root     xdm        976   1  tcp46  *:49152               *:*
root     xdm        976   3  udp46  *:177                 *:*
root     sendmail   916   4  tcp4   127.0.0.1:25          *:*
root     sshd       910   3  tcp46  *:22                  *:*
root     sshd       910   4  tcp4   *:22                  *:*
root     syslogd    752   7  udp4   *:514                 *:*
13:54:13
#ssh 127.0.0.1 -p 4444
The authenticity of host '[127.0.0.1]:4444 ([127.0.0.1]:4444)' can't be established.
DSA key fingerprint is 83:c6:70:6f:8a:7e:8b:e9:e4:53:26:31:28:d6:dc:f0.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[127.0.0.1]:4444' (DSA) to the list of known hosts.
l3-agent is already running: pid=1293; pidfile=/root/.lilalo/l3-agent.pid
13:54:47
#sockstat -4l
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
root     ntpdate    35764 4  udp4   *:123                 *:*
root     sshd       35606 7  tcp4   127.0.0.1:4444        *:*
root     xinetd     32631 0  tcp4   *:19                  *:*
root     xdm        980   1  tcp46  *:49152               *:*
root     Xorg       979   3  tcp4   *:6000                *:*
root     xdm        976   1  tcp46  *:49152               *:*
root     xdm        976   3  udp46  *:177                 *:*
root     sendmail   916   4  tcp4   127.0.0.1:25          *:*
root     sshd       910   3  tcp46  *:22                  *:*
root     sshd       910   4  tcp4   *:22                  *:*
root     syslogd    752   7  udp4   *:514                 *:*
13:55:00
#kill -9 35606

13:55:11
#exit
exit
Connection to 192.168.16.21 closed.
13:56:15
#kill -9 444
l3script: kill: (444) - Нет такого процесса
13:56:23
#kill -9 8699

13:56:34
#netstat -lnp | grep :444
tcp        0      0 127.0.0.1:4444          0.0.0.0:*               LISTEN      8768/sshd: root
tcp6       0      0 ::1:4444                :::*                    LISTEN      8768/sshd: root
13:57:17
#ssh 127.0.0.1 -p 4444
The authenticity of host '[127.0.0.1]:4444 ([127.0.0.1]:4444)' can't be established.
DSA key fingerprint is 13:3f:fb:2a:53:62:8e:f8:0e:c7:3a:c9:10:99:b6:25.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[127.0.0.1]:4444' (DSA) to the list of known hosts.
Last login: Tue Jun 15 14:54:08 2010 from debian4.net.nt
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.
FreeBSD 6.3-RELEASE (SMP) #0: Wed Jan 16 04:45:45 UTC 2008
Welcome to FreeBSD!
Before seeking technical support, please use the following resources:
...
   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=10856; pidfile=/root/.lilalo/l3-agent.pid
13:57:31
#netstat -lnp | grep :444
tcp        0      0 127.0.0.1:4444          0.0.0.0:*               LISTEN      8768/sshd: root
tcp6       0      0 ::1:4444                :::*                    LISTEN      8768/sshd: root
13:59:21
#exit
exit
Connection to 127.0.0.1 closed.
прошло 68 минут
15:08:07
#cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 15
model name      : Intel(R) Core(TM)2 Duo CPU     E6550  @ 2.33GHz
stepping        : 11
cpu MHz         : 2327.504
cache size      : 4096 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 10
wp              : yes
flags           : fpu de tsc msr pae cx8 apic cmov pat clflush acpi mmx fxsr sse sse2 ss ht nx constant_tsc up pni ssse3
bogomips        : 4657.73
clflush size    : 64
power management:
15:08:19
#ssh 192.168.16.254
root@192.168.16.254's password:
Permission denied, please try again.
root@192.168.16.254's password:
Linux debian 2.6.26-2-xen-686 #1 SMP Tue Mar 9 20:11:42 UTC 2010 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.
Last login: Tue Jun 15 05:55:23 2010 from host219.net.nt
...
debian:~# exit
   11 root      15  -5     0    0    0 S    0  0.0   0:00.08 khelper
logout
   23 root      15  -5     0    0    0 S    0  0.0   0:00.94 xenwatch
Connection to 192.168.16.254 closed.
   24 root      15  -5     0    0    0 S    0  0.0   0:04.98 xenbus
   51 root      15  -5     0    0    0 S    0  0.0   0:00.30 kblockd/0
   52 root      15  -5     0    0    0 S    0  0.0   0:00.04 kblockd/1
   54 root      15  -5     0    0    0 S    0  0.0   0:00.00 kacpid
   55 root      15  -5     0    0    0 S    0  0.0   0:00.00 kacpi_notify
прошло 36 минут
/dev/pts/4
15:44:30
#apt-get install vncviewer
Чтение списков пакетов... Готово
Построение дерева зависимостей
Чтение информации о состоянии... Готово
Заметьте, вместо vncviewer выбирается xtightvncviewer
Предлагаемые пакеты:
  tightvncserver ssh
НОВЫЕ пакеты, которые будут установлены:
  xtightvncviewer
обновлено 0, установлено 1 новых пакетов, для удаления отмечено 0 пакетов, и 345 пакетов не обновлено.
Необходимо скачать 88,7kБ архивов.
После данной операции, объём занятого дискового пространства возрастёт на 229kB.
Получено:1 http://debian.org.ua squeeze/main xtightvncviewer 1.3.9-6.1 [88,7kB]
Получено 88,7kБ за 0с (165kБ/c)
Выбор ранее не выбранного пакета xtightvncviewer.
(Чтение базы данных ... на данный момент установлено 72210 файлов и каталогов.)
Распаковывается пакет xtightvncviewer (из файла .../xtightvncviewer_1.3.9-6.1_i386.deb)...
Обрабатываются триггеры для man-db ...
Обрабатываются триггеры для menu ...
Настраивается пакет xtightvncviewer (1.3.9-6.1) ...
update-alternatives: используется `/usr/bin/xtightvncviewer' для предоставления `/usr/bin/vncviewer' (vncviewer) в автоматический режим.
Обрабатываются триггеры для menu ...
15:44:42
#vncviewer 192.168.16.21:02
vncviewer: VNC server closed connection
15:44:51
#man vncviewer
15:45:23
#vncviewer -debug 192.168.16.21:02
TightVNC Viewer version 1.3.9
Usage: vncviewer [<OPTIONS>] [<HOST>][:<DISPLAY#>]
       vncviewer [<OPTIONS>] [<HOST>][::<PORT#>]
       vncviewer [<OPTIONS>] -listen [<DISPLAY#>]
       vncviewer -help
<OPTIONS> are standard Xt options, or:
        -via <GATEWAY>
        -shared (set by default)
        -noshared
        -viewonly
...
        -truecolour
        -depth <DEPTH>
        -compresslevel <COMPRESS-VALUE> (0..9: 0-fast, 9-best)
        -quality <JPEG-QUALITY-VALUE> (0..9: 0-low, 9-high)
        -nojpeg
        -nocursorshape
        -x11cursor
        -autopass
Option names may be abbreviated, e.g. -bgr instead of -bgr233.
See the manual page for more information.
15:45:55
#vncviewer -debug=true 192.168.16.21:02
TightVNC Viewer version 1.3.9
Usage: vncviewer [<OPTIONS>] [<HOST>][:<DISPLAY#>]
       vncviewer [<OPTIONS>] [<HOST>][::<PORT#>]
       vncviewer [<OPTIONS>] -listen [<DISPLAY#>]
       vncviewer -help
<OPTIONS> are standard Xt options, or:
        -via <GATEWAY>
        -shared (set by default)
        -noshared
        -viewonly
...
        -truecolour
        -depth <DEPTH>
        -compresslevel <COMPRESS-VALUE> (0..9: 0-fast, 9-best)
        -quality <JPEG-QUALITY-VALUE> (0..9: 0-low, 9-high)
        -nojpeg
        -nocursorshape
        -x11cursor
        -autopass
Option names may be abbreviated, e.g. -bgr instead of -bgr233.
See the manual page for more information.
15:46:00
#vncviewer debug=true 192.168.16.21:02
TightVNC Viewer version 1.3.9
Usage: vncviewer [<OPTIONS>] [<HOST>][:<DISPLAY#>]
       vncviewer [<OPTIONS>] [<HOST>][::<PORT#>]
       vncviewer [<OPTIONS>] -listen [<DISPLAY#>]
       vncviewer -help
<OPTIONS> are standard Xt options, or:
        -via <GATEWAY>
        -shared (set by default)
        -noshared
        -viewonly
...
        -truecolour
        -depth <DEPTH>
        -compresslevel <COMPRESS-VALUE> (0..9: 0-fast, 9-best)
        -quality <JPEG-QUALITY-VALUE> (0..9: 0-low, 9-high)
        -nojpeg
        -nocursorshape
        -x11cursor
        -autopass
Option names may be abbreviated, e.g. -bgr instead of -bgr233.
See the manual page for more information.
15:46:55
#vncviewer 192.168.16.21:02
Connected to RFB server, using protocol version 3.8
No authentication needed
Authentication successful
Desktop name "x11"
VNC server default format:
  32 bits per pixel.
  Least significant byte first in each pixel.
  True colour: max red 255 green 255 blue 255, shift red 0 green 8 blue 16
Warning: Cannot convert string "-*-helvetica-bold-r-*-*-16-*-*-*-*-*-*-*" to type FontStruct
Using default colormap which is TrueColor.  Pixel format:
  32 bits per pixel.
  Least significant byte first in each pixel.
  True colour: max red 255 green 255 blue 255, shift red 0 green 8 blue 16
Using shared memory PutImage
ShmCleanup called

Среда (06/16/10)

/dev/pts/1
09:27:30
#iptables
iptables v1.4.6: no command specified
Try `iptables -h' or 'iptables --help' for more information.
09:27:33
#iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
09:27:42
#iptables -t filter -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
09:27:52
#iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
09:28:53
#iptables -t mangle -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
09:29:14
#iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
09:29:52
#iptables -t nat -P OUTPUT
iptables v1.4.6: -X requires a chain and a policy
Try `iptables -h' or 'iptables --help' for more information.
09:29:59
#iptables -t nat -P deny
iptables v1.4.6: -X requires a chain and a policy
Try `iptables -h' or 'iptables --help' for more information.
09:30:17
#man iptables
09:30:30
#iptables -t nat -P OUTPUT deny
iptables: Bad policy name. Run `dmesg' for more information.
09:30:36
#dmesg | tail
[    0.983698] EXT3-fs: mounted filesystem with ordered data mode.
[    2.136321] udev: starting version 151
[    2.873284] EXT3 FS on xvda1, internal journal
[    4.080784] fuse init (API version 7.9)
[    7.691081] NET: Registered protocol family 10
[    7.691356] lo: Disabled Privacy Extensions
[   18.482399] eth0: no IPv6 routers present
[   24.888830] inet: no IPv6 routers present
[ 5234.238579] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 5328.597187] nf_conntrack version 0.5.0 (10240 buckets, 40960 max)
09:31:59
#iptables -t filter -P OUTPUT DROP

/dev/hvc0
09:33:26
#iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy DROP)
target     prot opt source               destination
09:33:31
#iptables -A OUTPUT -s 0.0.0.0 -d 0.0.0.0 -j ACCEPT

09:35:41
#iptables -L -v
Chain INPUT (policy ACCEPT 8 packets, 655 bytes)
 pkts bytes target     prot opt in     out     source               destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
Chain OUTPUT (policy DROP 56 packets, 30033 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     all  --  any    any     default              default
09:36:01
#iptables -L -v
Chain INPUT (policy ACCEPT 11 packets, 869 bytes)
 pkts bytes target     prot opt in     out     source               destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
Chain OUTPUT (policy DROP 83 packets, 35892 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     all  --  any    any     default              default
09:36:03
#iptables -L -v
Chain INPUT (policy ACCEPT 11 packets, 869 bytes)
 pkts bytes target     prot opt in     out     source               destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
Chain OUTPUT (policy DROP 96 packets, 38147 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     all  --  any    any     default              default
09:36:04
#iptables -L -v
Chain INPUT (policy ACCEPT 11 packets, 869 bytes)
 pkts bytes target     prot opt in     out     source               destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
Chain OUTPUT (policy DROP 109 packets, 40402 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     all  --  any    any     default              default
09:36:04
#iptables -L -v
Chain INPUT (policy ACCEPT 11 packets, 869 bytes)
 pkts bytes target     prot opt in     out     source               destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
Chain OUTPUT (policy DROP 121 packets, 41194 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 ACCEPT     all  --  any    any     default              default

Файлы

  • /proc/cpuinfo
  • /proc/cpuinfo
    >
    processor       : 0
    vendor_id       : GenuineIntel
    cpu family      : 6
    model           : 15
    model name      : Intel(R) Core(TM)2 Duo CPU     E6550  @ 2.33GHz
    stepping        : 11
    cpu MHz         : 2327.504
    cache size      : 4096 KB
    fdiv_bug        : no
    hlt_bug         : no
    f00f_bug        : no
    coma_bug        : no
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 10
    wp              : yes
    flags           : fpu de tsc msr pae cx8 apic cmov pat clflush acpi mmx fxsr sse sse2 ss ht nx constant_tsc up pni ssse3
    bogomips        : 4657.73
    clflush size    : 64
    power management:
    

    Статистика

    Время первой команды журнала13:26:01 2010- 6-15
    Время последней команды журнала09:36:04 2010- 6-16
    Количество командных строк в журнале101
    Процент команд с ненулевым кодом завершения, %16.83
    Процент синтаксически неверно набранных команд, % 0.99
    Суммарное время работы с терминалом *, час 0.74
    Количество командных строк в единицу времени, команда/мин 2.27
    Частота использования команд
    ssh29|=======================| 23.58%
    iptables17|=============| 13.82%
    exit13|==========| 10.57%
    grep9|=======| 7.32%
    ssh-keygen6|====| 4.88%
    vncviewer5|====| 4.07%
    ssh-add4|===| 3.25%
    netstat4|===| 3.25%
    cat4|===| 3.25%
    >3|==| 2.44%
    echo3|==| 2.44%
    kill3|==| 2.44%
    ls3|==| 2.44%
    touch2|=| 1.63%
    sockstat2|=| 1.63%
    man2|=| 1.63%
    ssh-agent2|=| 1.63%
    authorized_keys'2|=| 1.63%
    :q!1|| 0.81%
    vim1|| 0.81%
    dmesg1|| 0.81%
    authorized1|| 0.81%
    EXIT1|| 0.81%
    scp1|| 0.81%
    eval1|| 0.81%
    tail1|| 0.81%
    apt-get1|| 0.81%
    mv1|| 0.81%
    ____
    *) Интервалы неактивности длительностью 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$