Best Way to Sign SSH certificate from your PC to your server
Follow commands below to sign certificate
Notice : Do not sudo to root
mkdir -p ~/.ssh (Create if you don't have yet)
chmod 700 ~/.ssh (add permission)
cd ~/.ssh
ssh-keygen -t rsa (This step please make sure you have enter the specific name of your ssh file)
ll ~/.ssh (Check the files list you have created )ssh-copy-id -i ~/.ssh/ur_cert_name.pub USER_NAME@SERVER_IP (Copy certificate pub to server)
Let system to use which SSH key
cd ~/.ssh
touch config (Create config file)
Add this inside the config file
nano ~/.ssh/config
Host SERVER_IP
HostName SERVER_IP
IdentityFile ~/.ssh/ur_cert_name
Note : If you have multi servers you can add config bellow
Host SERVER_IP1
HostName SERVER_IP1
IdentityFile ~/.ssh/ur_cert_name1
Host SERVER_IP2
HostName SERVER_IP2
IdentityFile ~/.ssh/ur_cert_name2
After done you can try to ssh USER_NAME@SERVER_IP