170 likes | 320 Views
Chapter 9 & 10 Networking & Internet. By C. Shing ITEC Dept Radford University. Objectives. Understand Unix utilities related to networking. Unix Utilities through Network - rsh. rsh servername command
E N D
Chapter 9 & 10 Networking & Internet By C. Shing ITEC Dept Radford University
Objectives • Understand Unix utilities related to networking
Unix Utilities through Network - rsh • rsh servername command Start a sub-shell and log on to the servername, execute the command and return to parent shell • Need .rhosts in home directory • Specify all host names that you can log in without a password (use the same username and password as those for the current machine) • Need /etc/hosts.equiv, /etc/hosts.allow, /etc/hosts.deny on current computer • Specify from all equivalent (or allowed or denied) hosts to log on current computer without password for any user
Unix Utilities through Network – users/rusers • users list all users on the computer • rusers list all users on the same network
Unix Utilities through Network – users/rusers (Cont.) • Example rsh rucs users check all users on rucs without login
Unix Utilities through Network – who/w • who list all sessions of users on the computer • whoami/logname list username on the shell • w list all sessions of users on the computer with more summary information such as idle time
Unix Utilities through Network – hostname/domainname • hostname list machine name • domainname dnsdomainname (Linux) list domainname on the network
Unix Utilities through Network – finger • finger username Find username’s information in .plan and .project
Unix Utilities through Network – write/talk/wall • write username [tty] send lines to on-line username on tty and same network use <ctrl><d> to end writing • talk username [tty] instant messenger • wall filename broadcast the content of the filename to all users on same network (e.g. shutdown message) Note: use mesg n to disable receiving message to terminal or use mesg y to allow writing to your terminal
Unix Utilities through Network – rcp/ftp/rsh/telnet/rlogin • rcp rhostname:file1absolutepath file2 copy file1 from remote hostname to file2 • rsh rhostname starts a sub-shell to logon remote hostname
Unix Utilities through Network – rcp/ftp/rsh/telnet/rlogin • ftp rhostname remote file transfer
Unix Utilities through Network – rcp/ftp/rsh/telnet/rlogin • Example: • ftp hostname • Type in username and password to log on to the host • binary This is needed if you want to transfer binary file correctly • cd directoryname This changes to directoryname • ls This lists files in the directory • get otherfilename This gets the otherfilename from hostname and stores in your current directory of your machine • put yourfilename This puts yourfilename from your machine to the directoryname of the hostname • exit/bye This exits the ftp session
Unix Utilities through Network – rcp/ftp/rsh/telnet/rlogin (Cont.) • telnet rhostname [port] remote logon to hostname with a telnet session (with certain port service) Example: telnet rucs 79 telnet to rucs and run finger (port 79) then quit
Unix Utilities through Network – rcp/ftp/rsh/telnet/rlogin (Cont.) Note: port number can be identified in /etc/services The open ports can be found using • netstat –a |more
Unix Utilities through Network – rcp/ftp/rsh/telnet/rlogin (Cont.) • rlogin rhostname remote logon to hostname • All hosts listed in .rhosts of your home directory on remote hosts will allow those hosts to logon without password
Translation of FQDN and IP Address • nslookup [ip address] Example: nslookup 137.45.192.100 • nslookup [FQDN] Example: nslookup www.radford.edu
Reference • Ch. 9, 10