Environment and Setup
VNEV/ ssh/ realvnc/ openvpn/ docker/ ROS 2 building
Secure Shell Protocol(SSH)
SSH is a protocol for secure communication between local and remote devices (servers) over an unprotected network. (Service Client Architecture)
Generating Key-pairs.
key.pub: public shared key used for authentication(Copied to server).
key: private key used for authenticate and decrypt data from server
Layer:
Application layer:
Terminal on the client's computer
Transport layer:
Client Side:
Send username, hostname, private key
Server Side:
Look for another pair on the server
After authentication, establish a user authentication layer (information is transmitted through this layer)
Establish User Authentication layer:
Option 1:
Use ssh-copy-id utilities to add the public key to the server
Option 2:
Manually add public key to the follow file .ssh/authorized_keys
Option 3:
Enter password to log into the device
File Transfer:
SFTP: able to transfer file && manage the file system
SCP: Only Transfer the file to the required location
Tunnelling:
Remote port forwarding:
Server can access service running on local
Local port forwarding:
Local can access service running on server
Forward a port to the other device using a different port. E.g: 8080 on client and 8001 on server
Reference
SSH: Architecture And Applications (SSH, SCP, SFTP, Tunneling or Port Forwarding)
RFC 4251: The Secure Shell (SSH) Protocol Architecture