/l3/users/clint/nt-lnet-2006-06-26/linux2.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 :22 |
|
#ping 192.168.16.16
PING 192.168.16.16 (192.168.16.16) 56(84) bytes of data. 64 bytes from 192.168.16.16: icmp_seq=1 ttl=64 time=0.239 ms 64 bytes from 192.168.16.16: icmp_seq=2 ttl=64 time=0.190 ms --- 192.168.16.16 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1000ms rtt min/avg/max/mdev = 0.190/0.214/0.239/0.028 ms |
#ping 192.168.16.126
PING 192.168.16.126 (192.168.16.126) 56(84) bytes of data. 64 bytes from 192.168.16.126: icmp_seq=1 ttl=64 time=0.212 ms 64 bytes from 192.168.16.126: icmp_seq=2 ttl=64 time=0.192 ms 64 bytes from 192.168.16.126: icmp_seq=3 ttl=64 time=0.190 ms 64 bytes from 192.168.16.126: icmp_seq=4 ttl=64 time=0.191 ms 64 bytes from 192.168.16.126: icmp_seq=5 ttl=64 time=0.198 ms 64 bytes from 192.168.16.126: icmp_seq=6 ttl=64 time=0.192 ms 64 bytes from 192.168.16.126: icmp_seq=7 ttl=64 time=0.184 ms --- 192.168.16.126 ping statistics --- 7 packets transmitted, 7 received, 0% packet loss, time 6000ms rtt min/avg/max/mdev = 0.184/0.194/0.212/0.011 ms |
#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 |
#ls
etherXXXXjjMOdZ kde-root lost+found ssh-ypjvKk6667 hello_root ksocket-root netcat |
#rsync -avz 192.168.15.15
The authenticity of host '192.168.15.15 (192.168.15.15)' can't be established. RSA key fingerprint is 73:9d:7a:af:19:8c:ec:15:31:3e:fe:58:c1:87:ea:f7. Are you sure you want to continue connecting (yes/no)? y3~lease type 'yes' or 'no': yes Warning: Permanently added '192.168.15.15' (RSA) to the list of known hosts. Password: Password: rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(242) [receiver=2.6.8] |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:79:67:96:71 inet addr:192.168.16.65 Bcast:192.168.16.127 Mask:255.255.255.192 inet6 addr: fe80::204:79ff:fe67:9671/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:251725 errors:0 dropped:0 overruns:0 frame:0 TX packets:251442 errors:0 dropped:0 overruns:0 carrier:665 collisions:0 txqueuelen:1000 RX bytes:283397582 (270.2 MiB) TX bytes:289815206 (276.3 MiB) Interrupt:209 Base address:0xdc00 eth1 Link encap:Ethernet HWaddr 00:07:E9:45:0D:2C ... collisions:0 txqueuelen:1000 RX bytes:25506359 (24.3 MiB) TX bytes:25511321 (24.3 MiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:4436 errors:0 dropped:0 overruns:0 frame:0 TX packets:4436 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:237418 (231.8 KiB) TX bytes:237418 (231.8 KiB) |
#iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
|
#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.192 U 0 0 0 eth1 192.168.16.64 0.0.0.0 255.255.255.192 U 0 0 0 eth0 |
#rsync -avz user@192.168.15.15:/etc/ m01_etc_tar/etc/
Password: receiving file list ... rsync: opendir "/etc/ppp/peers" failed: Permission denied (13) rsync: opendir "/etc/chatscripts" failed: Permission denied (13) rsync: opendir "/etc/ssl/private" failed: Permission denied (13) done rsync: mkdir "/tmp/m01_etc_tar/etc" failed: No such file or directory (2) rsync error: error in file IO (code 11) at main.c(509) [receiver=2.6.8] |
#rsync -avz user@192.168.15.15:/etc/ m01_tmp/etc
Password: Password: receiving file list ... rsync: opendir "/etc/ppp/peers" failed: Permission denied (13) rsync: opendir "/etc/chatscripts" failed: Permission denied (13) rsync: opendir "/etc/ssl/private" failed: Permission denied (13) done rsync: mkdir "/tmp/m01_tmp/etc" failed: No such file or directory (2) rsync error: error in file IO (code 11) at main.c(509) [receiver=2.6.8] |
#rsync -avz user@192.168.15.15:/etc/ /m01_tmp/etc/
Password: receiving file list ... rsync: opendir "/etc/ppp/peers" failed: Permission denied (13) rsync: opendir "/etc/chatscripts" failed: Permission denied (13) rsync: opendir "/etc/ssl/private" failed: Permission denied (13) done rsync: mkdir "/m01_tmp/etc" failed: No such file or directory (2) rsync error: error in file IO (code 11) at main.c(509) [receiver=2.6.8] |
#route adel default gw 192.168.16.65
Usage: route [-nNvee] [-FC] [<AF>] List kernel routing tables route [-v] [-FC] {add|del|flush} ... Modify routing table for AF. route {-h|--help} [<AF>] Detailed usage syntax for specified AF. route {-V|--version} Display version/author and exit. -v, --verbose be verbose -n, --numeric don't resolve names -e, --extend display other/more information -F, --fib display Forwarding Information Base (default) -C, --cache display routing cache instead of FIB <AF>=Use '-A <af>' or '--<af>'; default: inet List of possible address families (which support routing): inet (DARPA Internet) inet6 (IPv6) ax25 (AMPR AX.25) netrom (AMPR NET/ROM) ipx (Novell IPX) ddp (Appletalk DDP) x25 (CCITT X.25) |
#route del default gw 192.168.16.65
|
#route add default gw 192.168.16.16
|
#ping 192.168.15.254
PING 192.168.15.254 (192.168.15.254) 56(84) bytes of data. 64 bytes from 192.168.15.254: icmp_seq=1 ttl=63 time=0.380 ms --- 192.168.15.254 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.380/0.380/0.380/0.000 ms |
#ping mail.ru
PING mail.ru (194.67.57.26) 56(84) bytes of data. 64 bytes from mail.ru (194.67.57.26): icmp_seq=1 ttl=111 time=90.9 ms 64 bytes from mail.ru (194.67.57.26): icmp_seq=2 ttl=111 time=91.4 ms 64 bytes from mail.ru (194.67.57.26): icmp_seq=3 ttl=111 time=90.8 ms 64 bytes from mail.ru (194.67.57.26): icmp_seq=4 ttl=111 time=91.4 ms PING mail.ru (194.67.57.26) 56(84) bytes of data. 64 bytes from 194.67.57.26: icmp_seq=1 ttl=111 time=91.8 ms --- mail.ru ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 91.827/91.827/91.827/0.000 ms |
#ping 192.168.15.254
PING 192.168.15.254 (192.168.15.254) 56(84) bytes of data. 64 bytes from 192.168.15.254: icmp_seq=1 ttl=63 time=0.412 ms 64 bytes from 192.168.15.254: icmp_seq=2 ttl=63 time=0.345 ms 64 bytes from 192.168.15.254: icmp_seq=3 ttl=63 time=0.389 ms --- 192.168.15.254 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2002ms rtt min/avg/max/mdev = 0.345/0.382/0.412/0.027 ms |
#ping mail.ru
PING mail.ru (194.67.57.26) 56(84) bytes of data. 64 bytes from mail.ru (194.67.57.26): icmp_seq=1 ttl=111 time=90.9 ms 64 bytes from mail.ru (194.67.57.26): icmp_seq=2 ttl=111 time=91.4 ms 64 bytes from mail.ru (194.67.57.26): icmp_seq=3 ttl=111 time=90.8 ms 64 bytes from mail.ru (194.67.57.26): icmp_seq=4 ttl=111 time=91.4 ms 64 bytes from mail.ru (194.67.57.26): icmp_seq=5 ttl=111 time=89.4 ms 64 bytes from mail.ru (194.67.57.26): icmp_seq=6 ttl=111 time=91.0 ms 64 bytes from mail.ru (194.67.57.26): icmp_seq=7 ttl=111 time=90.1 ms 64 bytes from mail.ru (194.67.57.26): icmp_seq=8 ttl=111 time=89.9 ms --- mail.ru ping statistics --- 8 packets transmitted, 8 received, 0% packet loss, time 7076ms rtt min/avg/max/mdev = 89.456/90.678/91.494/0.754 ms |
#ping mail.ru
exit PING mail.ru (194.67.57.26) 56(84) bytes of data. 64 bytes from mail.ru (194.67.57.26): icmp_seq=1 ttl=111 time=91.6 ms 64 bytes from mail.ru (194.67.57.26): icmp_seq=2 ttl=111 time=90.3 ms --- mail.ru ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1000ms rtt min/avg/max/mdev = 90.389/91.034/91.679/0.645 ms |
#iptables -t nat -A PREROUTING -p tcp --dport 2200 -j DNAT --to 192.168.16.126:22
|
#rsync -avz user@192.168.15.15:/etc/ /tmp/etc/
default/rsync default/samba default/ssh default/ssh.dpkg-old default/syslogd default/tmpfs default/useradd default/welcome2l default/xprint defoma/ ... firefox/profile/chrome/ firefox/profile/chrome/userChrome-example.css firefox/profile/chrome/userContent-example.css flow-tools/ flow-tools/flow-capture.conf flow-tools/cfg/ flow-tools/cfg/filter.cfg flow-tools/cfg/map.cfg flow-tools/cfg/mask.cfg flow-tools/cfg/stat.cfg |
#time
real 0m0.000s user 0m0.000s sys 0m0.000s |
#date
Втр Июн 27 17:17:12 EEST 2006 |
#rsync -auvz user@192.168.15.15:/etc/ /tmp/etc/
Password: receiving file list ... rsync: opendir "/etc/ppp/peers" failed: Permission denied (13) rsync: opendir "/etc/chatscripts" failed: Permission denied (13) rsync: opendir "/etc/ssl/private" failed: Permission denied (13) done rsync: send_files failed to open "/etc/.pwd.lock": Permission denied (13) rsync: send_files failed to open "/etc/at.deny": Permission denied (13) rsync: send_files failed to open "/etc/group-": Permission denied (13) rsync: send_files failed to open "/etc/gshadow": Permission denied (13) rsync: send_files failed to open "/etc/gshadow-": Permission denied (13) ... rsync: send_files failed to open "/etc/ppp/chap-secrets": Permission denied (13) rsync: send_files failed to open "/etc/ppp/pap-secrets": Permission denied (13) rsync: send_files failed to open "/etc/ppp/ppp_on_boot.dsl": Permission denied (13) rsync: send_files failed to open "/etc/qt3/.qt_plugins_3.3rc.lock": Permission denied (13) rsync: send_files failed to open "/etc/samba/smbpasswd": Permission denied (13) rsync: send_files failed to open "/etc/ssh/ssh_host_dsa_key": Permission denied (13) rsync: send_files failed to open "/etc/ssh/ssh_host_rsa_key": Permission denied (13) sent 856 bytes received 98216 bytes 18013.09 bytes/sec total size is 17711601 speedup is 178.78 rsync error: some files could not be transferred (code 23) at main.c(1298) [generator=2.6.8] |
#time rsync -auvz user@192.168.15.15:/etc/
Password: Password: receiving file list ... rsync: opendir "/etc/ppp/peers" failed: Permission denied (13) rsync: opendir "/etc/chatscripts" failed: Permission denied (13) rsync: opendir "/etc/ssl/private" failed: Permission denied (13) done rsync: send_files failed to open "/etc/.pwd.lock": Permission denied (13) rsync: send_files failed to open "/etc/at.deny": Permission denied (13) rsync: send_files failed to open "/etc/group-": Permission denied (13) rsync: send_files failed to open "/etc/gshadow": Permission denied (13) ... rsync: send_files failed to open "/etc/qt3/.qt_plugins_3.3rc.lock": Permission denied (13) rsync: send_files failed to open "/etc/samba/smbpasswd": Permission denied (13) rsync: send_files failed to open "/etc/ssh/ssh_host_dsa_key": Permission denied (13) rsync: send_files failed to open "/etc/ssh/ssh_host_rsa_key": Permission denied (13) sent 856 bytes received 98216 bytes 9435.43 bytes/sec total size is 17711601 speedup is 178.78 rsync error: some files could not be transferred (code 23) at main.c(1298) [generator=2.6.8] real 0m9.284s user 0m0.055s sys 0m0.037s |
#vi /etc/cron
|
#vi /etc/crontab
|
#ssh 192.168.16.126
The authenticity of host '192.168.16.126 (192.168.16.126)' can't be established. RSA key fingerprint is cd:7d:92:44:f9:34:eb:df:3f:cc:a0:15:69:94:a9:d7. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.16.126' (RSA) to the list of known hosts. Password: Last login: Tue Jun 27 14:06:44 2006 from linux2.linux.nt l3-agent is already running: pid=3317; pidfile=/root/.lilalo/l3-agent.pid |
#ssh -P 192.168.16.62 : 22
The authenticity of host '192.168.16.62 (192.168.16.62)' can't be established. RSA key fingerprint is 07:18:94:2c:0b:9b:a6:d6:e1:70:03:f4:b8:e5:91:31. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.16.62' (RSA) to the list of known hosts. root@192.168.16.62's password: |
#ssh 192.168.16.16
The authenticity of host '192.168.16.16 (192.168.16.16)' can't be established. RSA key fingerprint is 73:9d:7a:af:19:8c:ec:15:31:3e:fe:58:c1:87:ea:f7. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.16.16' (RSA) to the list of known hosts. Password: Password: |
#ssh 192.168.16.16
Password: |
#ssh user@192.168.16.16
~ ~ ".ssh/known_hosts" 0L, 0C записано user@sergix:~$ ssh -p 2200 192.168.16.62 The authenticity of host '192.168.16.62 (192.168.16.62)' can't be established. RSA key fingerprint is cd:7d:92:44:f9:34:eb:df:3f:cc:a0:15:69:94:a9:d7. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '192.168.16.62' (RSA) to the list of known hosts. Password: Linux linux1.unix.nt 2.6.8-2-686-smp #1 SMP Mon Jan 24 02:32:52 EST 2005 i686 GNU/Linux 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. You have new mail. Last login: Tue Jun 27 11:50:44 2006 l3-agent is already running: pid=3136; pidfile=/home/user/.lilalo/l3-agent.pid |
#mii- tool
bash: mii-: command not found |
#mii-tool
eth0: negotiated 100baseTx-FD flow-control, link ok eth1: no link |
#mii-tool
eth0: negotiated 100baseTx-FD flow-control, link ok eth1: no link |
#ifdown eth0
SIOCDELRT: No such process |
#ifup eth0
|
#mii-tool
eth0: negotiated 100baseTx-FD flow-control, link ok eth1: no link |
#ping 192.168.15.254
PING 192.168.15.254 (192.168.15.254) 56(84) bytes of data. 64 bytes from 192.168.15.254: icmp_seq=1 ttl=64 time=0.223 ms 64 bytes from 192.168.15.254: icmp_seq=2 ttl=64 time=0.226 ms --- 192.168.15.254 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1001ms rtt min/avg/max/mdev = 0.223/0.224/0.226/0.015 ms |
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:04:79:67:96:71 inet addr:192.168.15.2 Bcast:192.168.15.255 Mask:255.255.255.0 inet6 addr: fe80::204:79ff:fe67:9671/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:252451 errors:0 dropped:0 overruns:0 frame:0 TX packets:252173 errors:0 dropped:0 overruns:0 carrier:665 collisions:0 txqueuelen:1000 RX bytes:283673014 (270.5 MiB) TX bytes:289889142 (276.4 MiB) Interrupt:209 Base address:0xdc00 eth1 Link encap:Ethernet HWaddr 00:07:E9:45:0D:2C ... collisions:0 txqueuelen:1000 RX bytes:25628750 (24.4 MiB) TX bytes:26062176 (24.8 MiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:4489 errors:0 dropped:0 overruns:0 frame:0 TX packets:4489 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:243988 (238.2 KiB) TX bytes:243988 (238.2 KiB) |
#mkdir /tmp/etc1
|
#ls /tmp
etc1 kde-user ksocket-user lost+found ssh-lUanAb3812 |
#rsync -auvz m01:/etc/ /tmp/etc1
ppp/tmp.zfVlsX/namehelp.txt ppp/tmp.zfVlsX/tmp.YQJrNX printcap profile protocols python2.3/site.py qt3/.qt_plugins_3.3rc.lock qt3/.qtrc.lock qt3/qt_plugins_3.3rc qt3/qtrc ... w3m/mailcap wgetrc xdg/menus/applications-merged/kde-essential.menu xdg/menus/applications-merged/kde-multimedia-music.menu xdg/menus/applications.menu xdg/menus/kde-information.menu xdg/menus/kde-screensavers.menu xdg/menus/kde-settings.menu sent 20396 bytes received 1087567 bytes 116627.68 bytes/sec total size is 3702283 speedup is 3.34 |
#ls /tmp/etc
ls: /tmp/etc: No such file or directory |
#ls /tmp/etc1
adduser.conf debconf.conf gshadow- locale.gen nanorc resolv.conf adjtime debian_version gtk localtime network rmt aliases default gtk-2.0 logcheck nsswitch.conf rpc alternatives defoma host.conf login.defs openoffice sane.d apm deluser.conf hostname logrotate.conf opt securetty apt devfs hosts logrotate.d pam.conf security at.deny dhclient.conf hosts.allow magic pam.d services bash.bashrc dhclient-script hosts.deny mailcap pango shadow bash_completion dictionaries-common hotplug mailcap.order papersize shadow- bash_completion.d discover.conf hotplug.d mailname passwd shells ... cron.daily esound iproute2 mkinitrd qt3 ucf.conf cron.hourly exim4 issue modprobe.d rc0.d updatedb.conf cron.monthly fdmount.conf issue.net modules rc1.d vga crontab fonts kde3 modules.conf rc2.d vim cron.weekly fstab kernel-img.conf modules.conf.old rc3.d w3m csh.cshrc groff ksysguarddrc modutils rc4.d wgetrc csh.login group ldap motd rc5.d X11 csh.logout group- ld.so.cache mtab rc6.d xdg cups gs-gpl ld.so.conf mtools.conf rcS.d Xprint cvs-cron.conf gshadow locale.alias Muttrc reportbug.conf |
#rm -r /tmp/etc1
|
#ls /tmp/etc1
ls: /tmp/etc1: No such file or directory |
#cd /etc
|
#ls
adduser.conf deluser.conf hostname login.defs network resolv.conf adjtime dhclient.conf hosts logrotate.conf networks rmt aliases dhclient-script hosts.allow logrotate.d nsswitch.conf rpc alternatives dictionaries-common hosts.deny lsb-base openoffice sane.d apm dirmngr hotplug mactab opt securetty apt discover.conf hotplug.d magic pam.conf security arpwatch.conf discover.conf-2.6 identd.conf mailcap pam.d services at.deny discover.d identd.key mailcap.order pango shadow bash.bashrc dpkg idmapd.conf mailname papersize shadow- bash_completion emacs imlib mail.rc passwd shells ... cron.monthly fstab ksysguarddrc modules.conf qt3 ucf.conf crontab gpm.conf ldap modules.conf.old rc0.d udev cron.weekly groff ld.so.cache modutils rc1.d updatedb.conf csh.cshrc group ld.so.conf motd rc2.d vga csh.login group- ld.so.hwcappkgs motd.tail rc3.d w3m csh.logout gshadow libpaper.d mtab rc4.d wgetrc debconf.conf gshadow- locale.alias mtools.conf rc5.d X11 debian_version gssapi_mech.conf locale.gen Muttrc rc6.d xdg default gtk-2.0 localtime mysql rcS.d xinetd.conf defoma host.conf logcheck nanorc reportbug.conf xinetd.d |
#ls -l
-rw-r--r-- 1 root root 2673 2004-12-07 00:45 debconf.conf -rw-r--r-- 1 root root 17 2005-06-06 20:50 debian_version drwxr-xr-x 2 root root 1024 2006-06-27 17:01 default drwxr-xr-x 4 root root 1024 2006-06-26 11:17 defoma -rw-r--r-- 1 root root 600 2006-04-26 17:01 deluser.conf -rw-r--r-- 1 root root 1518 2004-11-04 18:31 dhclient.conf -rwxr-xr-x 1 root root 6635 2005-12-04 00:06 dhclient-script drwxr-xr-x 2 root root 1024 2006-06-26 08:25 dictionaries-common drwxr-xr-x 3 root root 1024 2006-06-26 11:16 dirmngr -rw-r--r-- 1 root root 630 2006-03-28 15:00 discover.conf ... -rw-r--r-- 1 root root 1260 2004-10-28 21:50 ucf.conf drwxr-xr-x 3 root root 1024 2006-06-26 11:16 udev -rw-r--r-- 1 root root 805 2006-05-13 15:04 updatedb.conf drwxr-xr-x 2 root root 1024 2006-06-26 11:16 vga drwxr-xr-x 2 root root 1024 2006-06-26 08:25 w3m -rw-r--r-- 1 root root 4221 2005-10-13 14:26 wgetrc drwxr-xr-x 8 root root 1024 2006-06-26 12:15 X11 drwxr-xr-x 3 root root 1024 2006-06-26 11:13 xdg -rw-r--r-- 1 root root 1723 2006-06-27 13:31 xinetd.conf drwxr-xr-x 2 root root 1024 2006-06-27 12:33 xinetd.d |
#vi crontab
|
#cd /etc2
bash: cd: /etc2: No such file or directory |
#ls
etc2 kde-user ksocket-user lost+found ssh-lUanAb3812 |
#ls /etc2
ls: /etc2: No such file or directory |
#ls /etc2
ls: /etc2: No such file or directory |
#ls /etc2
ls: /etc2: No such file or directory |
#ls /etc2
ls: /etc2: No such file or directory |
#ls /
bin cdrom etc initrd lib media opt root srv tmp var boot dev home initrd.img lost+found mnt proc sbin sys usr vmlinuz |
#vi crontab
|
#vi /etc/crontab
|
#mkdir /tmp/bintest
|
#rm -r /tmp/etc2
|
#vi /etc/crontab
|
#ssh -X user@192.168.15.15
Password: Password: Linux sergix.tech.inc 2.6.16.5 #1 SMP PREEMPT Thu May 18 15:13:51 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 permitted by applicable law. eto motd.tail No mail. Last login: Tue Jun 27 16:24:38 2006 from 192.168.16.62 /usr/bin/X11/xauth: creating new authority file /home/user/.Xauthority user@sergix:~$ xclock Xlib: connection to "localhost:11.0" refused by server Xlib: Invalid MIT-MAGIC-COOKIE-1 key Error: Can't open display: localhost:11.0 user@sergix:~$ exit logout Connection to 192.168.15.15 closed. |
#ping google.com
PING google.com (192.168.15.254) 56(84) bytes of data. 64 bytes from linux.nt (192.168.15.254): icmp_seq=1 ttl=64 time=0.264 ms 64 bytes from linux.nt (192.168.15.254): icmp_seq=2 ttl=64 time=0.228 ms 64 bytes from linux.nt (192.168.15.254): icmp_seq=3 ttl=64 time=0.229 ms --- google.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2001ms rtt min/avg/max/mdev = 0.228/0.240/0.264/0.021 ms |
#ls /etc/ssh
moduli sshd_config ssh_host_dsa_key.pub ssh_host_rsa_key.pub ssh_config ssh_host_dsa_key ssh_host_rsa_key |
#ssh -keygen -lf /etc/ssh/ ssh_host_rsa_key
Bad escape character 'ygen'. |
#ssh -keygen -lf /etc/ssh/ssh_host_rsa_key
Bad escape character 'ygen'. |
#ssh-keygen -lf /etc/ssh/ssh_host_rsa_key
2048 07:18:94:2c:0b:9b:a6:d6:e1:70:03:f4:b8:e5:91:31 /etc/ssh/ssh_host_rsa_key.pub |
#iptables -L
Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:ssh ACCEPT tcp -- anywhere anywhere tcp dpt:smtp REJECT tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,ACK/SYN reject-with tcp-reset Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination |
#iptables -L -t nat
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 |
#netstat -ln | grep :22
|
#netstat -ln | grep :1000
tcp6 0 0 :::1000 :::* LISTEN |
#netstat -ln | grep sshd
|
#netstat -lnp | grep sshd
tcp6 0 0 :::1000 :::* LISTEN 3593/sshd |
#/etc/init.d/ssh restart
Restarting OpenBSD Secure Shell server: sshd. |
#netstat -lnp | grep sshd
tcp6 0 0 :::1000 :::* LISTEN 4660/sshd |
#vi /etc/ssh/sshd_config
5a6 > Port 22 |
#/etc/init.d/ssh restart
Restarting OpenBSD Secure Shell server: sshd. |
#netstat -lnp | grep sshd
tcp6 0 0 :::1000 :::* LISTEN 4694/sshd tcp6 0 0 :::22 :::* LISTEN 4694/sshd |
#netstat -lnp | grep sshdssh-keygen -t dsa
exit grep: invalid option -- t Usage: grep [OPTION]... PATTERN [FILE]... Try `grep --help' for more information. |
#ssh-keygen -t dsa
Generating public/private dsa key pair. 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: 64:f2:75:61:e3:12:71:31:cf:4d:fa:d4:72:bf:3c:c1 root@linux2.unix.nt |
#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 |
#ssh user@m01
Linux linux1.unix.nt 2.6.8-2-686-smp #1 SMP Mon Jan 24 02:32:52 EST 2005 i686 GNU/Linux 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. Last login: Wed Jun 28 09:42:06 2006 l3-agent is already running: pid=2976; pidfile=/home/user/.lilalo/l3-agent.pid |
#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)? n |
#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: 82:77:a8:e8:3c:3c:1a:27:04:dc:b7:9d:21:94:85:ff root@linux2.unix.nt |
#ssh user@m01
Linux linux1.unix.nt 2.6.8-2-686-smp #1 SMP Mon Jan 24 02:32:52 EST 2005 i686 GNU/Linux 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. Last login: Wed Jun 28 10:19:01 2006 from linux2.linux.nt l3-agent is already running: pid=2976; pidfile=/home/user/.lilalo/l3-agent.pid |
$exit
exit Connection to m01 closed. |
#cat ~/.ssh/id_dsa.pub | ssh user@192.168.15.15 'cat >> ~/.ssh/
uthorized_keys' Password: Password: Password: Permission denied (publickey,keyboard-interactive). |
#cat ~/.ssh/id_dsa.pub | ssh us
|
#cat ~/.ssh/id_dsa.pub | ssh root@m01 'cat >> ~/.ssh/authorized
keys' Password: |
#ssh m01
Last login: Wed Jun 28 10:22:07 2006 l3-agent is already running: pid=3408; pidfile=/root/.lilalo/l3-agent.pid |
Время первой команды журнала | 17:09:37 2006- 6-27 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:23:41 2006- 6-28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 26.73 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 0.99 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.17 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.44 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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