/l3/users/10-09-2007/nt-bsdnet/fbsd2.unix.nt/root :1 :2 :3 :4 :5 :6 :7 :8 :9 :10 :11 :12 :13 :14 :15 |
|
#telnet 192.168.15.243
Trying 192.168.15.243... telnet: connect to address 192.168.15.243: Permission denied telnet: Unable to connect to remote host |
#vi /etc/hosts.allow
|
#/etc/rc.d/ipfw stop
net.inet.ip.fw.enable: 1 -> 0 |
#telnet 192.168.15.243
Trying 192.168.15.243... Connected to host243.unix.nt. Escape character is '^]'. Trying SRA secure login: User (root): rootpass Password: [ SRA login failed ] User (root): Password: [ SRA login failed ] ... 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. Removing stale pidfile |
$exit
Connection closed by foreign host. |
#vi /etc/hosts.allow
28,29c28,30 < telnet : 127.0.0.1 localhost : allow < telnet : ALL : deny --- > telnetd : 192.168.15.0/255.255.255.255 : allow > telnetd : 127.0.0.1/255.0.0.0 : allow > telnetd : ALL : deny |
#vi /etc/rc.conf
|
#netstat -an | more
|
#ssh
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] |
#ssh 192.168.15.242
Password: Last login: Wed Sep 12 10:03:32 2007 from host237.unix.nt Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 6.2-RELEASE (SMP) #0: Fri Jan 12 11:05:30 UTC 2007 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. Removing stale pidfile |
#exit
Connection to 192.168.15.242 closed. |
#scp -r root@192.168.15.242:/etc /home/user/etc-that
ike 100% 312 0.3KB/s 00:00 inetd 100% 418 0.4KB/s 00:00 initrandom 100% 1635 1.6KB/s 00:00 ip6addrctl 100% 1599 1.6KB/s 00:00 ip6fw 100% 1327 1.3KB/s 00:00 ipfilter 100% 2605 2.5KB/s 00:00 ipfs 100% 1085 1.1KB/s 00:00 ipfw 100% 1443 1.4KB/s 00:00 ipmon 100% 754 0.7KB/s 00:00 ipnat 100% 905 0.9KB/s 00:00 ... portsnap.conf 100% 1367 1.3KB/s 00:00 pf.conf 100% 3775 3.7KB/s 00:00 pf.os 100% 28KB 27.7KB/s 00:00 phones 100% 293 0.3KB/s 00:00 profile 100% 619 0.6KB/s 00:00 rc 100% 3753 3.7KB/s 00:00 rc.subr 100% 33KB 33.3KB/s 00:00 rc.bsdextended 100% 5294 5.2KB/s 00:00 rc.firewall 100% 9575 9.4KB/s 00:00 rc.firewall6 100% 9084 8.9KB/s 00:00 |
#l
-rw-r--r-- 1 user wheel 797 Sep 7 14:52 .profile drwxr-xr-x 2 user wheel 512 Sep 12 09:54 .qt -rw------- 1 user wheel 276 Sep 7 14:52 .rhosts -rw-r--r-- 1 user wheel 975 Sep 7 14:52 .shrcserver_fbsd2.unix.nt_:0 -> /h drwx------ 2 user wheel 512 Sep 10 11:33 .ssh -rw-r--r-- 1 user wheel 9 Sep 10 10:47 .xinitrcver_fbsd2.unix.nt__0 drwx------ 2 user wheel 512 Sep 10 10:49 Desktophority drwxr-xr-x 3 user wheel 512 Sep 12 10:11 etc-thatstory -rw-r--r-- 1 user wheel 19 Sep 7 22:53 .bash_profile -rw-r--r-- 1 user wheel 43 Sep 7 22:49 .bashrc ... -rw-r--r-- 1 user wheel 52 Sep 7 22:50 .l3rc -rw------- 1 user wheel 35 Sep 12 10:10 .lesshst drwxr-xr-x 2 user wheel 2560 Sep 12 10:11 .lilalo drwx------ 3 user wheel 512 Sep 10 10:49 .local -rw-r--r-- 1 user wheel 248 Sep 7 14:52 .login -rw-r--r-- 1 user wheel 158 Sep 7 14:52 .login_conf -rw------- 1 user wheel 373 Sep 7 14:52 .mail_aliases -rw-r--r-- 1 user wheel 331 Sep 7 14:52 .mailrc drwxr-xr-x 3 user wheel 512 Sep 10 10:49 .mcop -rw------- 1 user wheel 31 Sep 12 09:54 .mcoprc |
# cd etc-that
|
#l
total 6 drwxr-xr-x 3 user wheel 512 Sep 12 10:11 . drwxr-xr-x 10 user wheel 1024 Sep 12 10:10 .. drwxr-xr-x 19 root wheel 2048 Sep 12 10:11 etc |
#root@192.168.15.242 pw useradd newuser
bash: root@192.168.15.242: command not found |
#ssh @192.168.15.242 pw useradd newuser
Password: |
#ssh root@192.168.15.242 newuser
Password: bash: newuser: command not found |
#ssh root@192.168.15.242 passwd
Password: Changing local password for newuser passwd: pam_chauthtok(): conversation failure |
#ssh root@192.168.15.242 passwd newuser
Password: Password: Changing local password for newuser passwd: pam_chauthtok(): conversation failure |
#ssh root@192.168.15.242
Password: Last login: Wed Sep 12 10:10:22 2007 from host243.unix.nt Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 6.2-RELEASE (SMP) #0: Fri Jan 12 11:05:30 UTC 2007 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. Removing stale pidfile |
#passwd newuser
Changing local password for newuser New Password: Retype New Password: |
#exit
Connection to 192.168.15.242 closed. |
#ssh-keygen -t rsa1
Generating public/private rsa1 key pair. Enter file in which to save the key (/root/.ssh/identity): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/identity. Your public key has been saved in /root/.ssh/identity.pub. The key fingerprint is: 49:5e:f2:64:df:01:03:01:bb:3c:52:3f:2a:98:4d:dd root@fbsd2.unix.nt |
#man ssh-keygen
|
#ssh-keygen -t rsa
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: af:5b:e4:9c:b7:b4:7d:7e:22:a2:6a:17:aa:82:c0:68 root@fbsd2.unix.nt |
#ssh-keygen -t da
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: 7f:a9:33:e2:b9:d7:39:79:e3:3f:b3:99:b8:6a:d3:d5 root@fbsd2.unix.nt |
#ssh user@192.168.15.242
Password: Last login: Wed Sep 12 10:15:27 2007 from localhost Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 6.2-RELEASE (SMP) #0: Fri Jan 12 11:05:30 UTC 2007 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. Removing stale pidfile |
$pwd
/home/user |
$l
bash: l: command not found |
$ls -al
total 88 drwxr-xr-x 19 user wheel 1024 Sep 12 10:10 . drwxr-xr-x 5 root wheel 512 Sep 9 12:30 .. lrwxr-xr-x 1 user wheel 39 Sep 12 09:15 .DCOPserver_fbsd1.unix.nt_:0 -> /home/user/.DCOPserver_fbsd1.unix.nt__0 -rw-r--r-- 1 user wheel 60 Sep 12 09:15 .DCOPserver_fbsd1.unix.nt__0 -rw------- 1 user wheel 726 Sep 12 09:15 .ICEauthority -rw------- 1 user wheel 168 Sep 12 09:15 .Xauthority -rw------- 1 user wheel 579 Sep 12 09:08 .bash_history -rw-r--r-- 1 user wheel 19 Sep 7 23:00 .bash_profile -rw-r--r-- 1 user wheel 43 Sep 7 22:59 .bashrc ... drwxr-xr-x 3 user wheel 512 Sep 11 12:33 .nautilus -rw-r--r-- 1 user wheel 797 Sep 7 15:48 .profile drwxr-xr-x 2 user wheel 512 Sep 12 09:15 .qt -rw-r--r-- 1 user wheel 218 Sep 11 12:41 .recently-used.xbel -rw------- 1 user wheel 276 Sep 7 15:48 .rhosts -rw-r--r-- 1 user wheel 975 Sep 7 15:48 .shrc drwx------ 2 user wheel 512 Sep 11 13:44 .ssh -rw-r--r-- 1 user wheel 9 Sep 10 10:47 .xinitrc -rw-r--r-- 1 user wheel 4855 Sep 12 10:01 .xsession-errors drwx------ 3 user wheel 512 Sep 11 16:01 Desktop |
$mkdir /.ssh
mkdir: /home/user/.ssh: File exists |
#l
total 6 drwxr-xr-x 3 user wheel 512 Sep 12 10:11 . drwxr-xr-x 10 user wheel 1024 Sep 12 10:10 .. drwxr-xr-x 19 root wheel 2048 Sep 12 10:11 etc |
#ssh user@192.168.15.242
Password: Last login: Wed Sep 12 10:19:49 2007 from host243.unix.nt Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 6.2-RELEASE (SMP) #0: Fri Jan 12 11:05:30 UTC 2007 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. Removing stale pidfile |
$l
bash: l: command not found |
$ls -al
total 88 drwxr-xr-x 19 user wheel 1024 Sep 12 10:10 . drwxr-xr-x 5 root wheel 512 Sep 9 12:30 .. lrwxr-xr-x 1 user wheel 39 Sep 12 09:15 .DCOPserver_fbsd1.unix.nt_:0 -> /home/user/.DCOPserver_fbsd1.unix.nt__0 -rw-r--r-- 1 user wheel 60 Sep 12 09:15 .DCOPserver_fbsd1.unix.nt__0 -rw------- 1 user wheel 726 Sep 12 09:15 .ICEauthority -rw------- 1 user wheel 168 Sep 12 09:15 .Xauthority -rw------- 1 user wheel 605 Sep 12 10:20 .bash_history -rw-r--r-- 1 user wheel 19 Sep 7 23:00 .bash_profile -rw-r--r-- 1 user wheel 43 Sep 7 22:59 .bashrc ... drwxr-xr-x 3 user wheel 512 Sep 11 12:33 .nautilus -rw-r--r-- 1 user wheel 797 Sep 7 15:48 .profile drwxr-xr-x 2 user wheel 512 Sep 12 09:15 .qt -rw-r--r-- 1 user wheel 218 Sep 11 12:41 .recently-used.xbel -rw------- 1 user wheel 276 Sep 7 15:48 .rhosts -rw-r--r-- 1 user wheel 975 Sep 7 15:48 .shrc drwx------ 2 user wheel 512 Sep 11 13:44 .ssh -rw-r--r-- 1 user wheel 9 Sep 10 10:47 .xinitrc -rw-r--r-- 1 user wheel 4855 Sep 12 10:01 .xsession-errors drwx------ 3 user wheel 512 Sep 11 16:01 Desktop |
$cd .ssh
|
$l
bash: l: command not found |
$ls -al
total 6 drwx------ 2 user wheel 512 Sep 11 13:44 . drwxr-xr-x 19 user wheel 1024 Sep 12 10:10 .. -rw-r--r-- 1 user wheel 1208 Sep 11 16:46 known_hosts |
$more known_hosts
|
$cd ..
|
$ls -al } more
ls: more: No such file or directory ls: }: No such file or directory |
$ls -al |more
|
$pwd
/home/user |
$touch ~/.ssh/authorized_keys
|
$chmod 700 ~/.ssh
|
$chmod 600 ~/.ssh/authorized_keys
|
$exit
Connection to 192.168.15.242 closed. |
#pwd
/home/user/etc-that |
#cd ..
|
#l
-rw-r--r-- 1 user wheel 797 Sep 7 14:52 .profile drwxr-xr-x 2 user wheel 512 Sep 12 09:54 .qt -rw------- 1 user wheel 276 Sep 7 14:52 .rhosts -rw-r--r-- 1 user wheel 975 Sep 7 14:52 .shrcserver_fbsd2.unix.nt_:0 -> /h drwx------ 2 user wheel 512 Sep 10 11:33 .ssh -rw-r--r-- 1 user wheel 9 Sep 10 10:47 .xinitrcver_fbsd2.unix.nt__0 drwx------ 2 user wheel 512 Sep 10 10:49 Desktophority drwxr-xr-x 3 user wheel 512 Sep 12 10:11 etc-thatstory -rw-r--r-- 1 user wheel 19 Sep 7 22:53 .bash_profile -rw-r--r-- 1 user wheel 43 Sep 7 22:49 .bashrc ... -rw-r--r-- 1 user wheel 52 Sep 7 22:50 .l3rc -rw------- 1 user wheel 35 Sep 12 10:10 .lesshst drwxr-xr-x 2 user wheel 2560 Sep 12 10:23 .lilalo drwx------ 3 user wheel 512 Sep 10 10:49 .local -rw-r--r-- 1 user wheel 248 Sep 7 14:52 .login -rw-r--r-- 1 user wheel 158 Sep 7 14:52 .login_conf -rw------- 1 user wheel 373 Sep 7 14:52 .mail_aliases -rw-r--r-- 1 user wheel 331 Sep 7 14:52 .mailrc drwxr-xr-x 3 user wheel 512 Sep 10 10:49 .mcop -rw------- 1 user wheel 31 Sep 12 09:54 .mcoprc |
#l
-rw-r--r-- 1 user wheel 797 Sep 7 14:52 .profile drwxr-xr-x 2 user wheel 512 Sep 12 09:54 .qt -rw------- 1 user wheel 276 Sep 7 14:52 .rhosts -rw-r--r-- 1 user wheel 975 Sep 7 14:52 .shrcserver_fbsd2.unix.nt_:0 -> /h drwx------ 2 user wheel 512 Sep 12 10:26 .ssh -rw-r--r-- 1 user wheel 9 Sep 10 10:47 .xinitrcver_fbsd2.unix.nt__0 drwx------ 2 user wheel 512 Sep 10 10:49 Desktophority drwxr-xr-x 3 user wheel 512 Sep 12 10:11 etc-thatstory -rw-r--r-- 1 user wheel 45 Sep 12 10:37 .bash_profile -rw-r--r-- 1 user wheel 43 Sep 7 22:49 .bashrc ... -rw-r--r-- 1 user wheel 52 Sep 7 22:50 .l3rc -rw------- 1 user wheel 35 Sep 12 11:00 .lesshst drwxr-xr-x 2 user wheel 2560 Sep 12 11:00 .lilalo drwx------ 3 user wheel 512 Sep 10 10:49 .local -rw-r--r-- 1 user wheel 248 Sep 7 14:52 .login -rw-r--r-- 1 user wheel 158 Sep 7 14:52 .login_conf -rw------- 1 user wheel 373 Sep 7 14:52 .mail_aliases -rw-r--r-- 1 user wheel 331 Sep 7 14:52 .mailrc drwxr-xr-x 3 user wheel 512 Sep 10 10:49 .mcop -rw------- 1 user wheel 31 Sep 12 09:54 .mcoprc |
#cd /root
|
#l
total 64 drwxr-xr-x 5 root wheel 512 Sep 12 11:01 . drwxr-xr-x 22 root wheel 512 Sep 11 17:40 .. -rw------- 1 root wheel 0 Sep 11 09:30 .Xauthority -rw------- 1 root wheel 8382 Sep 12 10:24 .bash_history -rw-r--r-- 1 root wheel 19 Sep 7 22:52 .bash_profile -rw-r--r-- 1 root wheel 38 Sep 7 22:49 .bashrc -rw-r--r-- 2 root wheel 801 Jan 12 2007 .cshrc drwxr-xr-x 2 root wheel 512 Sep 7 14:10 .gstreamer-0.8 -rw------- 1 root wheel 403 Sep 7 16:36 .history ... -rw------- 1 root wheel 35 Sep 12 11:01 .lesshst drwxr-xr-x 2 root wheel 6656 Sep 12 11:01 .lilalo -rw-r--r-- 1 root wheel 293 Jan 12 2007 .login -rw------- 1 root wheel 1792 Sep 11 13:29 .lsof_fbsd2 -rw-r--r-- 2 root wheel 251 Jan 12 2007 .profile drwx------ 2 root wheel 512 Sep 12 10:18 .ssh -rw-r--r-- 1 root wheel 4329 Sep 7 22:55 192.168.15.227 -rw-r--r-- 1 root wheel 4329 Sep 7 22:49 install -rw-r--r-- 1 root wheel 54 Sep 12 11:01 link -rw-r--r-- 1 root wheel 2645 Sep 10 10:48 xorg.conf.new |
#more link
|
#more link
|
#l
total 64 drwxr-xr-x 5 root wheel 512 Sep 12 11:04 . drwxr-xr-x 22 root wheel 512 Sep 11 17:40 .. -rw------- 1 root wheel 0 Sep 11 09:30 .Xauthority -rw------- 1 root wheel 8382 Sep 12 10:24 .bash_history -rw-r--r-- 1 root wheel 19 Sep 7 22:52 .bash_profile -rw-r--r-- 1 root wheel 38 Sep 7 22:49 .bashrc -rw-r--r-- 2 root wheel 801 Jan 12 2007 .cshrc drwxr-xr-x 2 root wheel 512 Sep 7 14:10 .gstreamer-0.8 -rw------- 1 root wheel 403 Sep 7 16:36 .history ... -rw------- 1 root wheel 35 Sep 12 11:04 .lesshst drwxr-xr-x 2 root wheel 6656 Sep 12 11:04 .lilalo -rw-r--r-- 1 root wheel 293 Jan 12 2007 .login -rw------- 1 root wheel 1792 Sep 11 13:29 .lsof_fbsd2 -rw-r--r-- 2 root wheel 251 Jan 12 2007 .profile drwx------ 2 root wheel 512 Sep 12 10:18 .ssh -rw-r--r-- 1 root wheel 4329 Sep 7 22:55 192.168.15.227 -rw-r--r-- 1 root wheel 4329 Sep 7 22:49 install -rw-r--r-- 1 root wheel 97 Sep 12 11:04 link -rw-r--r-- 1 root wheel 2645 Sep 10 10:48 xorg.conf.new |
#l
total 64 drwxr-xr-x 5 root wheel 512 Sep 12 11:04 . drwxr-xr-x 22 root wheel 512 Sep 11 17:40 .. -rw------- 1 root wheel 0 Sep 11 09:30 .Xauthority -rw------- 1 root wheel 8382 Sep 12 10:24 .bash_history -rw-r--r-- 1 root wheel 19 Sep 7 22:52 .bash_profile -rw-r--r-- 1 root wheel 38 Sep 7 22:49 .bashrc -rw-r--r-- 2 root wheel 801 Jan 12 2007 .cshrc drwxr-xr-x 2 root wheel 512 Sep 7 14:10 .gstreamer-0.8 -rw------- 1 root wheel 403 Sep 7 16:36 .history ... -rw------- 1 root wheel 35 Sep 12 11:04 .lesshst drwxr-xr-x 2 root wheel 6656 Sep 12 11:04 .lilalo -rw-r--r-- 1 root wheel 293 Jan 12 2007 .login -rw------- 1 root wheel 1792 Sep 11 13:29 .lsof_fbsd2 -rw-r--r-- 2 root wheel 251 Jan 12 2007 .profile drwx------ 2 root wheel 512 Sep 12 10:18 .ssh -rw-r--r-- 1 root wheel 4329 Sep 7 22:55 192.168.15.227 -rw-r--r-- 1 root wheel 4329 Sep 7 22:49 install -rw-r--r-- 1 root wheel 97 Sep 12 11:04 link -rw-r--r-- 1 root wheel 2645 Sep 10 10:48 xorg.conf.new |
#l
total 64 drwxr-xr-x 5 root wheel 512 Sep 12 11:04 . drwxr-xr-x 22 root wheel 512 Sep 11 17:40 .. -rw------- 1 root wheel 0 Sep 11 09:30 .Xauthority -rw------- 1 root wheel 8382 Sep 12 10:24 .bash_history -rw-r--r-- 1 root wheel 19 Sep 7 22:52 .bash_profile -rw-r--r-- 1 root wheel 38 Sep 7 22:49 .bashrc -rw-r--r-- 2 root wheel 801 Jan 12 2007 .cshrc drwxr-xr-x 2 root wheel 512 Sep 7 14:10 .gstreamer-0.8 -rw------- 1 root wheel 403 Sep 7 16:36 .history ... -rw------- 1 root wheel 35 Sep 12 11:04 .lesshst drwxr-xr-x 2 root wheel 6656 Sep 12 11:04 .lilalo -rw-r--r-- 1 root wheel 293 Jan 12 2007 .login -rw------- 1 root wheel 1792 Sep 11 13:29 .lsof_fbsd2 -rw-r--r-- 2 root wheel 251 Jan 12 2007 .profile drwx------ 2 root wheel 512 Sep 12 10:18 .ssh -rw-r--r-- 1 root wheel 4329 Sep 7 22:55 192.168.15.227 -rw-r--r-- 1 root wheel 4329 Sep 7 22:49 install -rw-r--r-- 1 root wheel 97 Sep 12 11:04 link -rw-r--r-- 1 root wheel 2645 Sep 10 10:48 xorg.conf.new |
#l
total 64 drwxr-xr-x 5 root wheel 512 Sep 12 11:04 . drwxr-xr-x 22 root wheel 512 Sep 11 17:40 .. -rw------- 1 root wheel 0 Sep 11 09:30 .Xauthority -rw------- 1 root wheel 8382 Sep 12 10:24 .bash_history -rw-r--r-- 1 root wheel 19 Sep 7 22:52 .bash_profile -rw-r--r-- 1 root wheel 38 Sep 7 22:49 .bashrc -rw-r--r-- 2 root wheel 801 Jan 12 2007 .cshrc drwxr-xr-x 2 root wheel 512 Sep 7 14:10 .gstreamer-0.8 -rw------- 1 root wheel 403 Sep 7 16:36 .history ... -rw------- 1 root wheel 35 Sep 12 11:04 .lesshst drwxr-xr-x 2 root wheel 6656 Sep 12 11:04 .lilalo -rw-r--r-- 1 root wheel 293 Jan 12 2007 .login -rw------- 1 root wheel 1792 Sep 11 13:29 .lsof_fbsd2 -rw-r--r-- 2 root wheel 251 Jan 12 2007 .profile drwx------ 2 root wheel 512 Sep 12 10:18 .ssh -rw-r--r-- 1 root wheel 4329 Sep 7 22:55 192.168.15.227 -rw-r--r-- 1 root wheel 4329 Sep 7 22:49 install -rw-r--r-- 1 root wheel 97 Sep 12 11:04 link -rw-r--r-- 1 root wheel 2645 Sep 10 10:48 xorg.conf.new |
#l
total 64 drwxr-xr-x 5 root wheel 512 Sep 12 11:04 . drwxr-xr-x 22 root wheel 512 Sep 11 17:40 .. -rw------- 1 root wheel 0 Sep 11 09:30 .Xauthority -rw------- 1 root wheel 8382 Sep 12 10:24 .bash_history -rw-r--r-- 1 root wheel 19 Sep 7 22:52 .bash_profile -rw-r--r-- 1 root wheel 38 Sep 7 22:49 .bashrc -rw-r--r-- 2 root wheel 801 Jan 12 2007 .cshrc drwxr-xr-x 2 root wheel 512 Sep 7 14:10 .gstreamer-0.8 -rw------- 1 root wheel 403 Sep 7 16:36 .history ... -rw------- 1 root wheel 35 Sep 12 11:04 .lesshst drwxr-xr-x 2 root wheel 6656 Sep 12 11:04 .lilalo -rw-r--r-- 1 root wheel 293 Jan 12 2007 .login -rw------- 1 root wheel 1792 Sep 11 13:29 .lsof_fbsd2 -rw-r--r-- 2 root wheel 251 Jan 12 2007 .profile drwx------ 2 root wheel 512 Sep 12 10:18 .ssh -rw-r--r-- 1 root wheel 4329 Sep 7 22:55 192.168.15.227 -rw-r--r-- 1 root wheel 4329 Sep 7 22:49 install -rw-r--r-- 1 root wheel 97 Sep 12 11:04 link -rw-r--r-- 1 root wheel 2645 Sep 10 10:48 xorg.conf.new |
#more link
|
#vi /etc/rc.conf
|
#vi /etc/firewall.conf
|
#more /etc/pf.conf
|
#/etc/rc.d/pf start
|
#ps -ax
PID TT STAT TIME COMMAND 0 ?? WLs 0:00.00 [swapper] 1 ?? ILs 0:00.01 /sbin/init -- 2 ?? DL 0:00.72 [g_event] 3 ?? DL 0:01.06 [g_up] 4 ?? DL 0:01.08 [g_down] 5 ?? DL 0:00.00 [thread taskq] 6 ?? DL 0:00.00 [kqueue taskq] 7 ?? DL 0:00.00 [acpi_task_0] 8 ?? DL 0:00.00 [acpi_task_1] ... 1099 p1 R 0:20.00 X :0 (Xorg) 1102 p1 I 0:00.00 sh /home/user/.xinitrc 1103 p1 I 0:00.02 /bin/sh /usr/local/bin/startkde 1162 p1 S 0:00.15 kwrapper ksmserver 2232 p3 Rs+ 0:00.08 script -t 0 -q /home/user/.lilalo//243522575064892724 2268 p4 Is 0:00.03 /usr/local/bin/bash -i 2366 p4 I 0:00.01 su 2367 p4 S+ 0:00.07 script -t 0 -q /root/.lilalo//279716588322651436-1189 2403 p6 Ss 0:00.08 /usr/local/bin/bash -i 2655 p6 R+ 0:00.00 ps -ax |
#cd /dev
|
#l
lrwxr-xr-x 1 root wheel 7 Jan 1 1970 net1 -> net/em0 lrwxr-xr-x 1 root wheel 7 Jan 1 1970 net2 -> net/xl0 lrwxr-xr-x 1 root wheel 9 Jan 1 1970 net3 -> net/plip0 lrwxr-xr-x 1 root wheel 7 Jan 1 1970 net4 -> net/lo0 crw------- 1 root wheel 0, 3 Sep 12 09:12 network crw------- 1 root wheel 0, 73 Sep 12 09:12 nfs4 crw------- 1 root kmem 0, 15 Sep 12 09:12 nfslock crw-rw-rw- 1 root wheel 0, 6 Sep 12 11:43 null crw-r--r-- 1 root wheel 0, 9 Sep 12 09:12 pci crw------- 1 root wheel 0, 54 Sep 12 09:12 ppi0 ... crw------- 1 root wheel 0, 60 Sep 12 09:13 ttyv5x0 crw------- 1 root wheel 0, 61 Sep 12 09:13 ttyv6f crw------- 1 root wheel 0, 62 Sep 12 09:13 ttyv7g crw------- 1 root wheel 0, 63 Sep 12 09:12 ttyv8m /var/run/log crw------- 1 root wheel 0, 64 Sep 12 09:12 ttyv9r -> fd/2 crw------- 1 root wheel 0, 65 Sep 12 09:12 ttyva -> fd/0 crw------- 1 root wheel 0, 66 Sep 12 09:12 ttyvbt -> fd/1 crw------- 1 root wheel 0, 67 Sep 12 09:12 ttyvcuse crw------- 1 root wheel 0, 68 Sep 12 09:12 ttyvdlectl crw------- 1 root wheel 0, 69 Sep 12 09:12 ttyve.initt/em0 |
#/etc/rc.d/pf stop
|
#/etc/rc.d/pf start
|
#/etc/netstart
devd already running? (pid=585). lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4 inet6 ::1 prefixlen 128 inet 127.0.0.1 netmask 0xff000000 em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 options=b<RXCSUM,TXCSUM,VLAN_MTU> inet 192.168.15.243 netmask 0xffffff00 broadcast 192.168.15.255 ether 00:07:e9:3c:29:9e media: Ethernet autoselect (100baseTX <full-duplex>) status: active Starting divert daemons:Flushed all rules. Firewall rules loaded. net.inet.ip.fw.enable: 0 -> 1 add net default: gateway 192.168.15.180 Additional routing options:. |
#vi /etc/rc.conf
17c17 < firewall_enable="YES" --- > pf_enable="YES" |
#/etc/rc.d/pf start
Enabling pf. No ALTQ support in kernel ALTQ related functions disabled No ALTQ support in kernel ALTQ related functions disabled No ALTQ support in kernel ALTQ related functions disabled pf enabled |
#vi /etc/firewall.conf
1c1,2 < --- > block in all > bloack out all |
#pfctl -f /etc/firewall.conf
No ALTQ support in kernel ALTQ related functions disabled /etc/firewall.conf:2: syntax error pfctl: Syntax error in config file: pf rules not loaded |
#pfctl -f /etc/firewall.conf
No ALTQ support in kernel ALTQ related functions disabled /etc/firewall.conf:2: syntax error pfctl: Syntax error in config file: pf rules not loaded |
#vi /etc/firewall.conf
2c2 < bloack out all --- > block out all |
#vi /etc/firewall.conf
2c2 < bloack out all --- > block out all |
#pfctl -f /etc/firewall.conf
No ALTQ support in kernel ALTQ related functions disabled |
#pfctl -f /etc/firewall.conf
No ALTQ support in kernel ALTQ related functions disabled |
#tcpdump -i em0 -n -p icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on em0, link-type EN10MB (Ethernet), capture size 96 bytes 11:47:37.920366 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 1, length 64 11:47:38.919997 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 2, length 64 11:47:39.923999 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 3, length 64 11:47:40.928248 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 4, length 64 11:47:41.936125 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 5, length 64 11:47:42.940247 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 6, length 64 11:47:43.940252 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 7, length 64 11:47:44.948250 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 8, length 64 ... 11:47:48.948386 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 12, length 64 11:47:49.948389 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 13, length 64 11:47:50.948392 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 14, length 64 11:47:51.948647 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 15, length 64 11:47:52.948524 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 16, length 64 11:47:53.948527 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 17, length 64 ^C 17 packets captured 22 packets received by filter 0 packets dropped by kernel |
#tcpdump -i em0 -n -p icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on em0, link-type EN10MB (Ethernet), capture size 96 bytes 11:47:37.920366 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 1, length 64 11:47:38.919997 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 2, length 64 11:47:39.923999 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 3, length 64 11:47:40.928248 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 4, length 64 11:47:41.936125 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 5, length 64 11:47:42.940247 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 6, length 64 11:47:43.940252 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 7, length 64 11:47:44.948250 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 8, length 64 ... 11:47:48.948386 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 12, length 64 11:47:49.948389 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 13, length 64 11:47:50.948392 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 14, length 64 11:47:51.948647 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 15, length 64 11:47:52.948524 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 16, length 64 11:47:53.948527 IP 192.168.15.180 > 192.168.15.243: ICMP echo request, id 50300, seq 17, length 64 ^C 17 packets captured 22 packets received by filter 0 packets dropped by kernel |
#vi /etc/firewall.conf
0a1 > pass in icmp all |
#vi /etc/firewall.conf
0a1 > pass in icmp all |
#pfctl -f /etc/firewall.conf
No ALTQ support in kernel ALTQ related functions disabled /etc/firewall.conf:1: syntax error pfctl: Syntax error in config file: pf rules not loaded |
#pfctl -f /etc/firewall.conf
No ALTQ support in kernel ALTQ related functions disabled /etc/firewall.conf:1: syntax error pfctl: Syntax error in config file: pf rules not loaded |
#vi /etc/firewall.conf
1c1 < pass in icmp all --- > pass icmp all |
#vi /etc/firewall.conf
1c1 < pass in icmp all --- > pass icmp all |
#pfctl -f /etc/firewall.conf
No ALTQ support in kernel ALTQ related functions disabled /etc/firewall.conf:1: syntax error pfctl: Syntax error in config file: pf rules not loaded |
#pfctl -f /etc/firewall.conf
No ALTQ support in kernel ALTQ related functions disabled /etc/firewall.conf:1: syntax error pfctl: Syntax error in config file: pf rules not loaded |
#vi /etc/firewall.conf
1c1,2 < pass icmp all --- > pass proto icmp all > pass in on em0 proto icmp from 192.168.15.0/24 to any |
#vi /etc/firewall.conf
1c1,2 < pass icmp all --- > pass proto icmp all > pass in on em0 proto icmp from 192.168.15.0/24 to any |
#pfctl -f /etc/firewall.conf
No ALTQ support in kernel ALTQ related functions disabled |
#pfctl -f /etc/firewall.conf
No ALTQ support in kernel ALTQ related functions disabled |
#vi /etc/firewall.conf
2c2 < pass in on em0 proto icmp from 192.168.15.0/24 to any --- > #pass in on em0 proto icmp from 192.168.15.0/24 to any |
#vi /etc/firewall.conf
2c2 < pass in on em0 proto icmp from 192.168.15.0/24 to any --- > #pass in on em0 proto icmp from 192.168.15.0/24 to any |
#pfctl -f /etc/firewall.conf
No ALTQ support in kernel ALTQ related functions disabled |
Время первой команды журнала | 10:00:57 2007- 9-12 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 11:50:43 2007- 9-12 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 101 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 13.86 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 4.95 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 0.71 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 2.38 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду 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