client to server by using ssh (windows version)
set up:
- You (Windows) = SSH Client
- VM (Linux) = SSH Server
Generate an SSH Key in client
-Cis a comment (any label, not functionally required)-fspecifies the filename to save the key- Press Enter twice to skip setting a passphrase (or set one for security)
Add the Public Key to vm server
- Copy the output
- login vm server by password first (ssh -p 1234 woon@1.0.0.X)
vim ~/.ssh/authorized_keys # in serverand paste the public key in the last entry
Configure SSH to Use the Right Key
Edit (or create) the C:\Users\woon\.ssh\config file:
Test SSH Connection to server
ssh X.0.0.X (Host X.0.0.X in client .ssh/config)
Expected result (for the first time):
SHA256:abcd/efg.the SSH host fingerprint shown when you connect to a server is derived from the public host key files- To see the fingerprint for the ED25519 key
- 'This host key is known by the following other names/addresses' : Cloned VMs Will Share Fingerprints
- a new fingerprint will be saved to your known_hosts in the windows client machine.
C:\Users\woon\.ssh>more known_hosts # in Client