__________________________________________________
** Before we start the lab, please Install and Launch Linux. **
__________________________________________________
Troubleshooting Bad Connections
1. Run command "ping www.haifengunimap.blogspot.com". (You may change to any other existing websites)
- This command will continuously to ping the website inserted.
- The output will be shown as below : (in normal condition)
- To stop the output, press "Ctrl + C" .
__________________________________________________
Copying Files to Another Machine - FTP and SCP
**Not counting email, the 2 most common ways to copy files to another machine are using FTP and SCP.
**FTP = File Transfer Protocol
**SCP = Secure Copy
__________________________________________________
** Before carry on, please install Filezilla Server in your PC. **
(1) Google "filezilla server" and go to the website to download it.
- Below is the example to download Filezilla Server :
(2) Install and set up the server.
__________________________________________________
1. Run command "ftp" follow by your Windows IP address.
- In my case, I use "ftp 10.12.144.227"
2. Type in the Username and Password.
3. If you login successfully, it will show something like "Logged on" in the terminal.
4. After that, try run command "ls -la".
- You should see a listing of file as below :
5. Run command "help" to show a list of commands.
6. One thing to remember when using ftp is to know where you are at all times.
- Run command "pwd"
7. The commands you type are on the server. To run a command locally, prefix the command with an exlamation mark. For examples :
- Run command "!pwd"
- Run command "!ls"
8. Run command "lcd /tmp" to change your local directory to /tmp.
9. Run command "put f1.txt" to copy the file "f1.txt" to the server.
10. Run command "get f1.txt" to retrieve the file "f1.txt" from the server.
11. After you finished with you ftp session, run command "quit".
__________________________________________________
**Now we run some scp commands. **
1. First, create a file.
- For example, I create file "f1.txt"
- Below is screenshot of the file in Linuxmint :
- "f1.txt" is the local filename that I want to copy.
- "User" is my username.
- "192.168.43.53" is the IP address of the host.
- "D:/" is the directory that I want to copy the file to.
- Below is the screenshot of the file in Windows :
3. Enter the password of the User.
4. Assuming you have a file "f5.txt" in Windows, try run command "scp User@192.168.43.53:/D:/f5.txt /tmp"
- "D:/f5.txt" is the file location in Windows.
- "/tmp" is the destination of the file.
- Below is the screenshot of the file in Windows :
5. Enter the password of the User.
6. Now run command "ls -la"
7. Below is the screenshot of outputs of commands above :
__________________________________________________
Logging into another Machine - Telnet and Secure Shell
** Telnet is an older protocol but is still used a lot today. It suffers from the same security problem as FTP. (It sends text in a non-encrypted format). **
**Please turn off the firewall before using Telnet. **
__________________________________________________
**Before carry on, please install Telnet Server in your PC. **
- I use KpyM Telnet server
(1) Google "kpym telnet server" and go to the website to download it.
- Below is the example to download the server :
(2) Install the server.(3) Make sure you select Port 23 for the server.
__________________________________________________
1. Run command "telnet 192.168.43.53"
2. A banner as below will be shown :
3. Enter the Username and Password.
4. Run command "dir" to see the list of directories.
5. Run command "exit" to end the session.
6. Below is the screenshot of the output of the commands :
__________________________________________________
** Follow the instructions stated in this website below to install SSH server. **
https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse
__________________________________________________
**Now we try running the Secure Shell session. **
1. Run command "ssh linuxmint@192.168.43.138"
- "linuxmint" is the username.
- "192.168.43.138" is the IP address of the host.
- Below is the screenshot of command to figure out the host IP address :
2. Run command "pwd"
3. Run command "uptime"
4. Run command "exit" to end session.
* I run the commands above in Command Prompt. *
__________________________________________________
Getting a Web Page Without a Browser - wget
** The wget program allows you to download files from URLs.
The simplest command is : "wget <URl>".
If there is no errors, it will place that file in the current directory.
If name is no specified, the default is "index.html" file. **
1. Run command "cd /tmp"
2. Run command "wget www.jklewis.com"
3. The file will be named as "index.html"
4. You can also refer to specific files.
- For example, run command "wget www.jklewis.com/shipfire.gif"
5. Below is the screenshot of the output of commands above :
__________________________________________________
** "wget" can do a lot more. With the right parameters, it can be used to clone entire websites and a lot of other neat things. **
__________________________________________________
Thank you for reading. Feel free to ask me if you have any questions.
__________________________________________________
Comments
Post a Comment