your key. This puts the secret key in~/.ssh/id_dsa and the public key in ~/.ssh/id_dsa.pub. Now seewhether you have an ssh-agent running at present: echo $SSH_AGENT_PIDMost window managers will run it automatically if it's installed. Ifnot, start one up: eval $(ssh-agent)Now, tell the agent about your key: ssh-addand enter your passphrase. You'll need to do this each time you login; if you're using X, try adding SSH_ASKPASS=ssh-askpass ssh-addto your .xsession file. (You may need to install ssh-askpass.) Nowfor each server you log into, create the directory ~/.ssh and copythe file ~/.ssh/id_dsa.pub into it as ~/.ssh/authorized_keys . If youstarted the ssh-agent by hand, kill it with ssh-agent -kwhen you log out. Using rsyncover sshDifficulty: Intermediate Application: Shell Keep large directory structures in sync quickly with rsync. Whiletar over SSH is ideal for making remote copies of parts of afilesystem, rsync is even better suited for keeping the filesystem insync between two machines. To run an rsync over SSH, pass it the -eswitch, like this: rsync -ave ssh greendome:/home/ftp/pub/ /home/ftp/pub/Note the trailing / on the file spec from the source side (ongreendome.) On the source spec, a trailing / tells rsync to copy thecontents of the directory, but not the directory itself. To includethe directory as the top level of what's being copied, leave off the/: rsync -ave ssh bcnu:/home/six .This will keep a copy of the ~/six/ directory on village in sync withwhatever is present on bcnu:/home/six/. By default, rsync will onlycopy files and directories, but not remove them from the destinationcopy when they are removed from the source. To keep the copies exact,include the --delete flag: rsync -ave ssh --delete greendome:~one/reports .Now when old reports are removed from ~one/reports/ on greendome,they're also removed from ~six/public_html/reports/ on the syncedversion, every time this command is run. If you run a command likethis in cron, leave off the v switch. This will keep the output quiet(unless rsync has a problem running, in which case you'll receive anemail with the error output). Using SSH as your transport for rsynctraffic has the advantage of encrypting the data over the network andalso takes advantage of any trust relationships you already haveestablished using SSH client keys. Asset scanningDifficulty: Intermediate Application: nmap Normally, when people think of using nmap, they assume it's usedto conduct some sort of nefarious network reconnaissance inpreparation for an attack. But as with all powerful tools, nmap canbe made to wear a white hat, as it's useful for far more thanbreaking into networks. For example, simple TCP connect scans can beconducted without needing root privileges: nmap rigelnmap can also scan ranges of IP addresses by specifying the range orusing CIDR notation: nmap 192.168.0.1-254nmap 192.168.0.0/24nmap can provide much more information if it is run as root. When runas root, it can use special packets to determine the operating systemof the remote machine by using the -O flag. Additionally, you can dohalf-open TCP scanning by using the -sS flag. When doing a half-openscan, nmap will send a SYN packet to the remote host and wait toreceive the ACK from it; if it receives an ACK, it knows that theport