- Local create
public_key
&private_key
- Only
private_key
can understandpublic_key
- Remote sends message encrypted based on
public_key
- Local has to use
private_key
to understand (decrypt) remote’s message - To easy to manage SSH, you can use Terminus app
The default of location SSH Key:
- Windows:
C:\Users\namnh198\.ssh
- Linux & MacOS:
~/.ssh => /home/namnh198/.ssh
- Create a key different names, e.g
id_rsa_magento_cloud
,… - Add to
~/.ssh/config
- Add to
ssh-keygen
(Don’t need to retype password again)
Suppose that we wanna connect to a remote host username@remote.com
from a local machine
- On local machine, copy public key at
~/.ssh
- On remote server, go to
~/.ssh
open fileauthorized_keys
and paste contents of yourpublic_key
to it
Some arguments:
i
: Identity Filef
: Request ssh to go to background just before command excutionL
: Local port forwardingp
: Portq
: Quiet modev
: Verbose modeX
: Running GUI remote app locallyC
: Use data compression
To read more some SSH
command: