440 likes | 601 Views
Chapter 7: Using Network Clients. The Complete Guide To Linux System Administration. Objectives. Log in to a Linux system over a network connection Use command-line tools for common network services such as FTP and the Web Perform simple network diagnostic checks. Remote Login.
E N D
Chapter 7:Using Network Clients The Complete Guide To Linux System Administration
Objectives • Log in to a Linux system over a network connection • Use command-line tools for common network services such as FTP and the Web • Perform simple network diagnostic checks The Complete Guide to Linux System Administration
Remote Login • Networking integrated into kernel • Easily log in across network • Perform virtually same work as if you were seated in front of Linux system • Server • Program running on Linux system listens for connections over network • Serves up information to another program • Client • Program making requests The Complete Guide to Linux System Administration
Remote Login (continued) • telnet • Most basic remote login capability • Set up by default on Red Hat Linux • Completely unprotected • r-utilities • Designed to access remote computers in order to: • Run programs • Transfer files • Perform other functions within trusted network environment • Designed for convenience, not security The Complete Guide to Linux System Administration
Remote Login (continued) The Complete Guide to Linux System Administration
Remote Login (continued) • Secure shell (SSH) • Similar to telnet • Uses encryption so that everything transmitted over network is unreadable to other users The Complete Guide to Linux System Administration
The Telnet Remote Login Utility • Terminal emulation program • Log in to remote computer as if you were sitting at computer’s keyboard • Must have: • telnet client • telnet server • Command • telnet paris.mydomain.org The Complete Guide to Linux System Administration
The Telnet Remote Login Utility (continued) • telnet session • Login • Execute commands on remote computer • telnet designed for text only • telnet program included with most versions of windows The Complete Guide to Linux System Administration
The Telnet Remote Login Utility (continued) The Complete Guide to Linux System Administration
The telnet Remote Login Utility (continued) • To use telnet, need to know: • Remote host • Port number • Type of terminal to emulate • User name and password The Complete Guide to Linux System Administration
Using r-Utilities for Remote Execution • r-utilities • Not used much anymore • Useful for working with multiple computers in trusted network • Most effective when you can set up configuration file on multiple computers • /etc/hosts.equiv file • Contains hosts and user names permitted to access system using r-utilities The Complete Guide to Linux System Administration
Using r-Utilities for Remote Execution (continued) The Complete Guide to Linux System Administration
Using r-utilities for Remote Execution (continued) • rhosts file • List of hosts and user names that you want to permit to access account without password The Complete Guide to Linux System Administration
Secure Shell (SSH) • Encrypted version of telnet • Data encoded so that only authorized recipient can read it • Can also act as complete networking toolkit • SSH consists of: • Client utility―ssh or slogin • Server program―sshd The Complete Guide to Linux System Administration
Secure Shell (SSH) (continued) • SSH package also includes utilities • Openssh • Free version of SSH • Installed by default on many Linux systems • SSH can authenticate a connection using: • r-utilities files • User passwords • Public key encryption (preferred method) The Complete Guide to Linux System Administration
Secure Shell (SSH) (continued) • Public key encryption • Method of encrypting information • Establishes secure connection without sending key over network connection • In a way that compromises security of connection The Complete Guide to Linux System Administration
Data Services • Tools for accessing • Web • E-mail • Other network-based data services The Complete Guide to Linux System Administration
Accessing the Web • Lynx • Text-based browser • Access Web sites when working on system that doesn’t have graphical interface • Very fast • Can be run from any command-line window • To use: lynx www.yahoo.com • Can download pages automatically using -dump option The Complete Guide to Linux System Administration
Accessing the Web (continued) The Complete Guide to Linux System Administration
Accessing the Web (continued) • wget command • Download Web pages • Designed specifically for command-line downloading of Web pages • Example: wget http//www.gnu.org/philosophy/philosophy.html • Download recursively • Download Web page you indicate • Plus all pages referred to on page • Plus all pages linked to from those pages The Complete Guide to Linux System Administration
Accessing the Web (continued) • Mirroring • Process of copying entire Web site or FTP site • Mirror entire Web site • wget -m -k -K -E http//www.gnu.org/ -o /tmp/gnu_site_log & • kget graphical utility • Enter one or more urls • Have them downloaded to system in background while you do other work The Complete Guide to Linux System Administration
Accessing the Web (continued) The Complete Guide to Linux System Administration
Accessing the Web (continued) • rsync utility • Uses SSH to transport files between systems • After first time files are copied, checks remote files to see what changes need to be updated • Example: rsync -avz stockholmdocs/ /data/docs The Complete Guide to Linux System Administration
Accessing FTP Servers • File transfer protocol (FTP) • Standard method used to move files between computers on Internet • Most publicly visible FTP servers support anonymous access • Log in using user name anonymous or FTP • Enter e-mail address as password • Browser provides login information automatically in background The Complete Guide to Linux System Administration
Accessing FTP Servers (continued) The Complete Guide to Linux System Administration
Accessing FTP Servers (continued) • User name and password access • Administrator of FTP server must permit this type of connection • Access url: ftp//nwells@FTPXmissionCom/pub • Web browser starts connection and prompts for password • Graphical FTP clients • IglooFTP pro • gFTP The Complete Guide to Linux System Administration
Accessing FTP Servers (continued) • FTP utility • Text-mode program • Example: ftp ftp.ibiblio.org • Prompt changes to ftp> • Can transfer files in text mode or binary mode • ncftp program • Similar to ftp • Preferred by administrators • Package includes other utilities (ncftpget, ncftpput) The Complete Guide to Linux System Administration
Accessing FTP Servers (continued) The Complete Guide to Linux System Administration
Accessing FTP Servers (continued) The Complete Guide to Linux System Administration
Accessing FTP Servers (continued) The Complete Guide to Linux System Administration
Networking and Network Diagnostic Tools • Solve basic networking problems • Understand basics of networking • Use a few standard utilities The Complete Guide to Linux System Administration
Introduction to Networking • Internet protocol (IP) • Core of networking in Linux • Sends packets of information across network • Ethernet • Most widely used type of networking hardware • Other network hardware • Token ring • Wireless 80211b The Complete Guide to Linux System Administration
Introduction to Networking (continued) • IP address • Allows computers to locate each other on network • Each computer that uses IP must have address • Represented as series of four numbers • Each from 0 to 255 • Network mask helps system route packets correctly between multiple networks The Complete Guide to Linux System Administration
Introduction to Networking (continued) • Routing • Moving packets of information efficiently through networks to reach correct destination • Only necessary when you have multiple networks that need to communicate • Gateway or router • Computer attached to multiple networks used by computers on one network can reach other networks The Complete Guide to Linux System Administration
Introduction to Networking (continued) • Transmission control protocol (TCP) provides stable connection between two computers • Domain name • Used by humans to address computers • Must be converted to IP address • Domain name system (DNS) converts domain names to IP addresses • Dynamic host configuration protocol (DHCP) issues IP addresses on request The Complete Guide to Linux System Administration
Introduction to Networking (continued) • ifconfig command • View active networking interfaces • Usually two network interfaces on Linux client • Local interface • Ethernet interface • Can also use graphical tools to set up or alter network configuration The Complete Guide to Linux System Administration
Using ping for System Testing • ping utility • Sends diagnostic data packet to specified computer • Verifies network connectivity • Example: ping 1986022.20 • Use series of ping commands to test networking • ping to hosts further and further away from your system The Complete Guide to Linux System Administration
Using ping for System Testing • Can also be used for malicious attacks • “Flood ping” • “Ping of death” • Many computers on internet do not respond to ping to prevent attacks The Complete Guide to Linux System Administration
Using traceroute to Examine Routing Patterns • traceroute command • Carefully tracks each router between you and destination host • Lets you see • Exactly where packets are going • How long each hop takes • Tries a maximum of 30 hops to reach destination • Can change this value The Complete Guide to Linux System Administration
Using traceroute to Examine Routing Patterns (continued) • Useful tool for diagnosing problems such as • Where packet stops • Where packet slows down • My traceroute program • Graphical interface in Red Hat The Complete Guide to Linux System Administration
Using traceroute to Examine Routing Patterns (continued) The Complete Guide to Linux System Administration
Summary • Well-known methods of accessing Linux systems remotely • telnet • r-utilities • SSH suite of utilities • Command-line utilities provided in Linux to download Web pages and access FTP sites • Networking in Linux is based on IP The Complete Guide to Linux System Administration
Summary (continued) • Computers communicate across multiple networks by: • Relying on routing information • Sending data packets through routers or gateways • DNS servers convert domain names to IP addresses • ifconfig utility displays network interfaces in Linux The Complete Guide to Linux System Administration
Summary (continued) • ping command sends test packet to network location to determine if location is reachable • traceroute command shows computers that data packet traverses between your system and system you want to reach The Complete Guide to Linux System Administration