100%(1)1 out of 1 people found this document helpful
This preview shows page 4 - 7 out of 15 pages.
3.Finding out the IP NumberYou can use the following command to find out the IP number assigned to the network interface of your host:ifconfig eth0If the shell complains "command not found", use its full path instead:/sbin/ifconfig eth04.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:
ssh email@example.comPlease note you should not do your systems programming exercises onceto. A buggy program can bring down the machine.5.File Transfer between Local Host and Remote HostYou can also transfer files between the local host and the remote host using sftpcommand. 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 firstname.lastname@example.orgNote sftphas a fairly rich set of commands, such ascd directory : set the current directory on the remote hostlcd directory : set the current directory on the local hostpwd : print the current directory on the remote hostlpwd : print the current directory on the local hostls : list the current directory on the remote hostlls : list the current directory on the local hostput filename: transfer files from local host to remote host. Note you can use wildcards in the file name, such Ex*.cand Ex*.? .get filename: transfer files from remote host to local host. Note you can use wildcards in the file name, such Ex*.cand Ex*.? .help: get helpBy 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 asWinScpand PuTTY.
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 StatusOne 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:~ $psPID TTY TIME CMD31587 pts/0 00:00:00 bash31601 pts/0 00:00:00 pshong:~ $here PIDis the process ID, a unique integer for each process.