This video shows the step of how to obtain IP and mac address for VM clients by using hostname via putty, connecting host to client by using SSH command and transfer files from host to clients and between client to client via SCP command.
Step to obtain IP and mac address for client:-
1. Turn on the VM client.
2. Open the terminal in the VM client.
3. Install the SSH server by key in sudo apt-get install openssh-server and press enter.
4. Generate SSH key by key in ssh-keygen and press for the subsequent step if not wish to change the location and passphases.
5. Verify the hostname by key in hostname and press enter. The default hostname will be ubuntu. Therefore, we will need to change the hostname for the other client. Refer Step to change hostname for details.
6. Open putty.exe from the laptop.
7. Key in the hostname ubuntu and click open.
8. If connected successful, it will required to key in the client's username and password.
9. Key in ifconfig and press enter.
10. The IP address will be the inet addr and the mac address will be the HWaddr.
Step to change hostname for client:-
1. Open the terminal in the VM client.
2. Key in sudo hostname [new hostname] and press enter.
3. Key in sudo nano /etc/hostname and update the new hostname.
4. Key in sudo nano /etc/hosts and update the new hostname.
5. Restart the VM client in order for new hostname to take effect.
Step to check IP and mac address for host:-
1. Open command prompt in the host PC.
2. key in ipconfig and press enter.
3. IP and mac address will be shown.
Step to connecting host to client:-
1. Open command prompt with administrator right in the host PC.
2. Key in ssh [client's username]@[client's IP address] and press enter. For example, ssh [email protected]
3. Key in the password and the connection been established if no error.
Step to transfer files from host to client:-
1. Open command prompt with administrator right in host PC.
2. Key in scp [source directory] [client's username]@[client's IP address]:[target directory] and press enter. For example, scp C:\Users\user\Desktop\adults-bride-couple-1488318.jpg [email protected]:\home\jacksoncah\Desktop
3. If everything ok, there will be a progress of the file copying.
4. Open the VM client and the file will be at the desktop.
Step to transfer files between client to client:-
1. Open command prompt with administrator right in host PC.
2. Connect host to client with the ssh command. Refer to Step to connecting host to client.
3. Key in scp [source directory] [client's username]@[client's IP address]:[target directory] and press enter. Note: Change \ to / as Linux using / instead of \ as the location path. For example, scp /home/jacksoncah/Desktop/adults-bride-couple-1488318.jpg [email protected]:/home/jacksonchang/Desktop
4. If everything ok, there will be a progress of the file copying.
5. Open the VM client that we are transferring and the file will be at the desktop.