Complete the code to generate a new SSH key pair.
ssh-keygen -t [1] -f ~/.ssh/id_rsadsa which is outdated and less secure.rsa without specifying key size.The ed25519 algorithm is recommended for SSH keys because it is secure and fast.
Complete the command to copy your public key to the remote server for passwordless login.
ssh-copy-id -i ~/.ssh/id_rsa.pub [1]@remote_hostroot without permission.guest which may not have SSH access.You should replace user with your actual username on the remote server.
Fix the error in the SSH config file to specify the private key file.
Host remote
HostName example.com
User user
IdentityFile [1]config.The IdentityFile should point to your private key, not the public key or other files.
Fill both blanks to create a directory and set correct permissions for SSH keys.
mkdir -p ~/.ssh && chmod [1] ~/.ssh && chmod [2] ~/.ssh/id_rsa
755 on private keys, making them world-readable.644 on the .ssh directory.The .ssh directory needs 700 permissions to be accessible only by you. The private key file needs 600 permissions to be readable and writable only by you.
Fill all three blanks to create an SSH config entry for a server with a custom port and identity file.
Host myserver HostName [1] Port [2] IdentityFile [3]
IdentityFile.Use the server IP or hostname for HostName, the custom SSH port number for Port, and the path to your private key for IdentityFile.