/l3/users/eb/2009/linux0/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 :16 :17 :18 :19 :20 :21 :22 :23 :24 :25 :26 :27 :28 :29 :30 :31 :32 :33 :34 :35 :36 :37 :38 :39 :40 :41 :42 :43 (local_session_id::26100169193195617141-1244028586) |
|
#ls -l
итого 3324 drwxr-xr-x 2 root root 4096 Май 25 16:40 17179869184 drwxr-xr-x 2 root root 4096 Май 25 16:40 345448 drwxr-xr-x 2 root root 4096 Май 25 16:40 345789358 -rw-r--r-- 1 root root 0 Май 29 14:52 ABCABCf -rw-r--r-- 1 root root 0 Май 29 14:50 ABCABC:gff -rw-r--r-- 1 root root 0 Май 29 14:50 ABCfff drwxr-xr-x 2 root root 4096 Июн 3 11:51 bin -rw-r--r-- 1 root root 3024896 Июн 1 10:34 etc.iso -rw-r--r-- 1 root root 0 Май 26 18:22 F ... -rw-r--r-- 1 root root 0 Май 26 18:22 F.7 -rw-r--r-- 1 root root 0 Май 26 18:22 F.8 -rw-r--r-- 1 root root 0 Май 26 18:22 F.9 -rw-r--r-- 1 root root 0 Май 29 14:50 ffff -rw-r--r-- 1 root root 0 Май 29 14:52 fffffff -rw-r--r-- 1 root root 12 Май 25 14:47 file -rw-r--r-- 1 root root 54606 Май 29 10:24 iceweasel.dot -rw-r--r-- 1 root root 12 Май 25 14:47 last-ping -rw-r--r-- 1 root root 4737 Май 29 10:19 screen.dot -rw-r--r-- 1 root root 271894 Май 29 10:20 screen.png |
#ls -l|less
|
#cd /home
|
#ls
approx quiz user user1 user2 user3 userX userY |
#cd quiz
|
#ls
quiz quiz2 quiz3 start-quiz |
#cat start-quiz
cat: start-quiz: Нет такого файла или каталога |
#cd start-quiz
bash: cd: start-quiz: Нет такого файла или каталога |
#cat /home/quiz/start-quiz
#!/usr/bin/perl $id = $ENV{"SSH_CLIENT"}; $id = (split(/\s+/, $id))[0]; if ($id) { $id .= "-"}; $quiz_file = "quiz"; $log_file = ".quiz/$id".time().'.log'; @Questions = (); $Score = 0; sub ask_question($) { ... } else { $question .= $_; }; } close(QUIZ); for $question (@Questions) { $Score += ask_question($question); } print "Your score: $Score\n"; |
#cat /home/quiz/start-quiz|less
|
#cat /home/quiz
cat: /home/quiz: Это каталог |
#cat /home/quiz/
.bash_history .hushlogin.10 .hushlogin.6 quiz .ssh/ .bash_logout .hushlogin.2 .hushlogin.7 .quiz/ start-quiz .bashrc .hushlogin.3 .hushlogin.8 .quiz1/ .viminfo .hushlogin .hushlogin.4 .hushlogin.9 quiz2/ .hushlogin.1 .hushlogin.5 .profile quiz3/ |
#cat /home/quiz/quiz
# 0.1 ÑÐ°Ñ ÐоÑле Ñого как crontab бÑл изменÑн, Ð´Ð»Ñ Ñого ÑÑÐ¾Ð±Ñ ÐµÐ³Ð¾ пеÑеÑиÑаÑÑ, нÑжно ли пеÑезапÑÑкаÑÑ cron, и еÑли нÑжно, Ñо как? # /etc/init.d/crond restart # /etc/init.d/crontab restart # /etc/init.d/crontab reload # pkill -1 cron # pkill -1 crond #! ÐеÑ, не нÑжно пеÑезапÑÑкаÑÑ, crontab и Ñак пеÑеÑиÑÑваеÑÑÑ Ð§Ñо обознаÑÐ°ÐµÑ Ñимвол % в команде в crontab? ... # strace `which prg` #! ldd `which prg` # strings `which prg' # strace 'which prg' Ðак полÑÑиÑÑ Ð¿Ð¾Ð»Ð½Ñй ÑпиÑок Ñайлов, коÑоÑÑе пÑоÑеÑÑ 1234 оÑкÑÑÐ²Ð°ÐµÑ Ð² Ñ Ð¾Ð´Ðµ Ñвоей ÑабоÑÑ (не ÑолÑко, коÑоÑÑе оÑкÑÑÑÑ ÑейÑаÑ). #! strace -p 1234 -o /tmp/1234.strace; grep open /tmp/1234.strace #* lsof -p 1234 # strings `which 1234` # strings 'which 1234' |
#netstat -lnp -A inet
|
#netstat -lnp -A inet
ÑÐ# =) |
#ssh 192.168.15.12
ssh: connect to host 192.168.15.12 port 22: Connection refused |
#/etc/init.d/ssh restart
Restarting OpenBSD Secure Shell server: sshd. |
#exit
exit Connection to 192.168.15.1 closed. |
#man ssh
|
#screen -x
|
#ыыcat /etc/ssh/sshd_config
# Package generated configuration file # See the sshd(8) manpage for details # What ports, IPs and protocols we listen for Port 22222 # Use these options to restrict which interfaces/protocols sshd will bind to #ListenAddress :: #ListenAddress 0.0.0.0 Protocol 2 # HostKeys for protocol version 2 HostKey /etc/ssh/ssh_host_rsa_key ... PrintMotd no PrintLastLog yes TCPKeepAlive yes #UseLogin no #MaxStartups 10:30:60 #Banner /etc/issue.net # Allow client to pass locale environment variables AcceptEnv LANG LC_* Subsystem sftp /usr/lib/openssh/sftp-server UsePAM yes |
#ssh -w 192.168.16.1:192.168.16.2 -N -f 192.168.15.1
Bad tun device '192.168.16.1:192.168.16.2' |
#ssh -w 0Ð:92.168.16.1:192.168.16.2 -N -f 192.168.15.1
Bad tun device '0:192.168.16.1:192.168.16.2' |
#ssh -w 0 -N -f 192.168.15.1
Enter passphrase for key '/root/.ssh/id_dsa': channel 0: open failed: administratively prohibited: open failed |
#ssh 192.168.15.1
Enter passphrase for key '/root/.ssh/id_dsa': l3-agent is already running: pid=4276; pidfile=/root/.lilalo/l3-agent.pid |
#getent passwd
root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/bin/sh bin:x:2:2:bin:/bin:/bin/sh sys:x:3:3:sys:/dev:/bin/sh sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/bin/sh man:x:6:12:man:/var/cache/man:/bin/sh lp:x:7:7:lp:/var/spool/lpd:/bin/sh mail:x:8:8:mail:/var/mail:/bin/sh news:x:9:9:news:/var/spool/news:/bin/sh ... bea:x:1013:1013::/home/bea:/bin/sh beckie:x:1014:1014::/home/beckie:/bin/sh becky:x:1015:1015::/home/becky:/bin/sh behdad:x:1016:1016::/home/behdad:/bin/sh belinda:x:1017:1017::/home/belinda:/bin/sh ben:x:1018:1018::/home/ben:/bin/sh benjamin:x:1019:1019::/home/benjamin:/bin/sh benny:x:1020:1020::/home/benny:/bin/sh benson:x:1021:1021::/home/benson:/bin/sh bernard:x:1022:1022::/home/bernard:/bin/sh |
#exit
exit Connection to linux1 closed. |
#ifconfig
dummy0 Link encap:Ethernet HWaddr a2:95:80:44:21:2b inet addr:1.2.3.4 Bcast:1.255.255.255 Mask:255.0.0.0 inet6 addr: fe80::a095:80ff:fe44:212b/64 Scope:Link UP BROADCAST RUNNING NOARP MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:1257 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:40224 (39.2 KiB) eth0 Link encap:Ethernet HWaddr 00:16:3e:04:00:12 inet addr:10.0.35.100 Bcast:10.255.255.255 Mask:255.0.0.0 ... collisions:0 txqueuelen:1000 RX bytes:78254616 (74.6 MiB) TX bytes:148269989 (141.4 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:1606 errors:0 dropped:0 overruns:0 frame:0 TX packets:1606 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:79590 (77.7 KiB) TX bytes:79590 (77.7 KiB) |
#ifconfig -a | less
|
#ifconfig tun0 192.168.16.1
|
#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.015 ms --- 192.168.16.1 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.015/0.015/0.015/0.000 ms |
#ssh -w 1:192.168.17.1 -N -f 192.168.15.1
Bad tun device '1:192.168.17.1' |
#alias exit='echo no exit'
|
#cat /etc/ssh/ssh
ssh_config sshd_config ssh_host_dsa_key ssh_host_dsa_key.pub ssh_host_rsa_key ssh_host_rsa_key.pub |
#cat /etc/ssh/sshd_config
# Package generated configuration file # See the sshd(8) manpage for details # What ports, IPs and protocols we listen for Port 22222 # Use these options to restrict which interfaces/protocols sshd will bind to #ListenAddress :: #ListenAddress 0.0.0.0 Protocol 2 # HostKeys for protocol version 2 HostKey /etc/ssh/ssh_host_rsa_key ... PrintMotd no PrintLastLog yes TCPKeepAlive yes #UseLogin no #MaxStartups 10:30:60 #Banner /etc/issue.net # Allow client to pass locale environment variables AcceptEnv LANG LC_* Subsystem sftp /usr/lib/openssh/sftp-server UsePAM yes |
#zless /usr/share/dict/propernames | head -100 | tail -20
Avery Axel Barbara Barbra Barney Barrett Barrio Barry Bart Barton Bea Beckie Becky Behdad Belinda Ben Benjamin Benny Benson Bernard |
|