3 Finding out the IP Number You can use the following command to find out the

3 finding out the ip number you can use the following

This preview shows page 4 - 7 out of 15 pages.

3. Finding out the IP Number You can use the following command to find out the IP number assigned to the network interface of your host: ifconfig eth0 If the shell complains "command not found", use its full path instead: /sbin/ifconfig eth0 4.Accessing Remote HostsIf you have an account on another machine (the remote host), and that machine runs a SSH-2 server, you can log in to the remote host using SSH client ssh. sshis similar to telnet. The main difference is that telnettransmits data, including your password, in clear text, while sshencrypts the data, therefore is more secure.You should have an account on ceto.murdoch.edu.au , which runs Debian Linux. Your username and password are your Murdoch Username and Murdoch Password. Now login to your ceto account with following command:
Image of page 4
ssh your_username @ceto.murdoch.edu.au Please note you should not do your systems programming exercises on ceto. A buggy program can bring down the machine. 5. File Transfer between Local Host and Remote Host You can also transfer files between the local host and the remote host using sftp command. Its user interface is similar to that of ftp . The data and password are encrypted during the data transfer so it is more secure that ftp . Transfer a few files between your Linux virtual machine and ceto with the following command: sftp your_username @ceto.murdoch.edu.au Note sftp has a fairly rich set of commands, such as cd directory : set the current directory on the remote host lcd directory : set the current directory on the local host pwd : print the current directory on the remote host lpwd : print the current directory on the local host ls : list the current directory on the remote host lls : list the current directory on the local host put filename : transfer files from local host to remote host. Note you can use wildcards in the file name, such Ex*.c and Ex*.? . get filename : transfer files from remote host to local host. Note you can use wildcards in the file name, such Ex*.c and Ex*.? . help : get help By using this command, you may transfer files between the Linux virtual machine and the Windows host machine in the lab. Since the Linux runs SSH-2 server, you can use a SSH-2 client from the Windows host to connect to the Linux SSH-2 server to do file transfer. There are several free SSH-2 clients for Windows, such as WinScp and PuTTY .
Image of page 5
Firstly you need to find out the IP number assigned to the Linux host. This can be done using ifconfig . Then start the SSH-2 client from Windows, enter the IP number of the Linux virtual machine, and the username ( student ) and the password ( student ). Try it. 6. Finding Out Process Status One of the most important Unix commands is ps . With this command you can find out various information about processes running on your machine. Without options, this command displays the list of processes running under the current shell. Example: hong:~ $ps PID TTY TIME CMD 31587 pts/0 00:00:00 bash 31601 pts/0 00:00:00 ps hong:~ $ here PID is the process ID, a unique integer for each process.
Image of page 6
Image of page 7

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture