SSH
The SSH Protocol, also called Secure Shell, is a method for secure remote login from one computer to another. Unlike telnet, it is secure. (Refer this article)
How to use SSH to connect to your server
1. Install
openssh-server
2. Check if the SSH service is up or not
or
3. Create host-only adapter in VM
(VirtualBox) Network -> Enable Network Adapter -> Host-only Adapter
4. Testing connection from cmd
5. Establish the SSH connection
Using public and private key to establish SSH connection
1. Client generate
private and public key (rsa key pair)
2. Forward and save public key to server (Ubuntu)
3. Client initiates SSH connection to server
4. Server send an random message to client
5. Client use its private key to encrypt the message and send it back to server
6. Server decrypted message with public key
7. If the raw
message equals to decrypted message, then client is authenticated
How to use Putty
1. Using PuTTYgen to generate public/private key pair
2. Save private key in disk
3. Copy public key and paste it to server
4. In Putty, from Connection -> SSH -> Auth, browse the private key you stored before
5. Then, you don't
need to enter password anymore
SCP
scp
source_file_name username@destination_host:destination_folder
-v: Provide
the detail information of scp process
-p: Provide
time and speed information of scp process
-C: Make file transfer faster
No comments:
Post a Comment