You are on page 1of 44

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 3

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 4

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 computers 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

10

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 11

Using r-Utilities for Remote Execution (continued)

The Complete Guide to Linux System Administration

12

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

13

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 utilityssh or slogin Server programsshd

The Complete Guide to Linux System Administration

14

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

15

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

16

Data Services
Tools for accessing
Web E-mail

Other network-based data services

The Complete Guide to Linux System Administration

17

Accessing the Web


Lynx
Text-based browser Access Web sites when working on system that doesnt 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 18

Accessing the Web (continued)

The Complete Guide to Linux System Administration

19

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 20

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 21

Accessing the Web (continued)

The Complete Guide to Linux System Administration

22

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

23

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 24

Accessing FTP Servers (continued)

The Complete Guide to Linux System Administration

25

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 26

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 27

Accessing FTP Servers (continued)

The Complete Guide to Linux System Administration

28

Accessing FTP Servers (continued)

The Complete Guide to Linux System Administration

29

Accessing FTP Servers (continued)

The Complete Guide to Linux System Administration

30

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

31

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

32

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

33

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 34

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 35

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

36

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

37

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

38

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

39

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

40

Using traceroute to Examine Routing Patterns (continued)

The Complete Guide to Linux System Administration

41

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

42

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

43

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

44

You might also like