home
clear breadcrumbs
search
login
 
ssh
client side ############ create key pair: ssh-keygen ssh-add
if there is a agent error: eval "$(ssh-agent -s)" server side ########### add the pub contents to the end of the authorized keys file on the server Instead of using ssh-add, create a config file and add a directive: ~/.ssh/config IdentityFile path/filename permissions:600 ssh-keygen ssh-copy-id -i keyfile user@host if password auth is enabled: ssh -i keyfile user@host setting up ssh on a new digital ocean droplet: https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-20-04 https://www.ssh.com/ssh/keygen/ You can use this if you already have access to the server Generate key pair: ssh-keygen To add a public key to a server: # not the .pub file ssh-copy-id -i id_rsa pete@ubuntu or if passwords are disabled use webmin to upload the public key to the server edit the ~/.ssh/authorized_keys file to include the contents of the .pub file. cat ~/id_rsa.pub >> ~/.ssh/authorized_keys or append the contents of the pub file to the end of the authorized_keys file * client * Run ssh-add
To log onto server without adding private key to know_hosts: ssh -i (identify file) (server) ssh -i gallium_os peteolson.me error: sign_and_send_pubkey: signing failed: agent refused operation Looks like an ssh-agent is running already but it can not find any keys attached. To solve this add the private key identities to the authentication agent on the client like so: ssh-add Then you can ssh into your server. in addition you can see the list of fingerprints of all identities currently added by: ssh-add -l #pbo all host key HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_ecdsa_key HostKey /etc/ssh/ssh_host_ed25519_key #pbo PubkeyAuthentication yes #pbo AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2 #pbo PasswordAuthentication yes #pbo changed to no UsePAM no xll ssh To run app remotely display locally: local:~$ ssh -Y 215-9th.tk remote:~$ codeblocks