OPS235 SSH

From CDOT Wiki
Revision as of 12:52, 2 February 2010 by Cheping (talk | contribs) (Created page with 'TCP/IP Network * IP Address - IPv4: the IP address is a 32bit number * e.g. 192.168.122.1 --> 11000000 10101000 01111010 00000001 * Newer IP address format is IPv6: the IP addres...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

TCP/IP Network

  • IP Address - IPv4: the IP address is a 32bit number
  • e.g. 192.168.122.1 --> 11000000 10101000 01111010 00000001
  • Newer IP address format is IPv6: the IP address is a 128 bit number

Virtual Network: 192.168.122.0/24

Host IP: 192.168.122.1

  • 192.168.122.0 --> is used to identify the network
  • 192.168.122.255-->is used as the broadcast address
  • 192.168.122.1 --> is a so called unicast address -> go to one network device only
  • multicast address --> go to a group of devices

VM1 (fedora1) IP: 192.168.122.(2-254)

VM2 (fedora2) IP: 192.168.122.(2-254)

VM3 (fedora3) IP: 192.168.122.135 (yours may be different)

VM3 <-> Host (checking connectivity using the ping command)

ping 192.168.122.1 (will keep pinging)
ping -c 2 192.168.122.1 (will send two packets to check for connectivity)

We can use the ssh utility to login to VM3 (ip:192.168.122.135)

ssh user_name@192.168.122.135

To copy a file from host to VM3

scp week4 root@192.168.122.135:

(copy the file called "week4" in the current directory of the local machine to the home directory of user "root" on 192.168.122.135)

scp root@192.168.122.135:week4-x .

(copy the file called "week4-x" from the home directory of user "root" on 192.168.122.135 to the current directory of the local machine.


copy the file called "week4-x" from the current directory of the local machine to the /tmp directory on fedora3 (192.168.122.135)

scp week4-x root@192.168.122.135:/tmp