ssh add new key code example
Example 1: eval ssh-agent
eval `ssh-agent`
Example 2: ubuntu generate ssh key
ssh-keygen -t rsa -C "[email protected]"
Example 3: ssh add new key
$ eval "$(ssh-agent -s)"
> Agent pid 59566
Example 4: how to generate ssh key in linux
ssh-keygen -t rsa -b 4096
ssh-keygen -t dsa
ssh-keygen -t ecdsa -b 521
ssh-keygen -t ed25519
Example 5: add public key to server
ssh-copy-id -i ~/.ssh/mykey.pub user@host