Linux/Unix Open SSH Login Without Password Key Exchange including Debian, Redhat, Fedora, Ubuntu, BSD etc.. -

Linux/Unix Open SSH Login Without Password Key Exchange including Debian, Redhat, Fedora, Ubuntu, BSD etc..

In those 4 simple commands you can setup mutual key exchange between two sshservers by using a single login shell session and single window.

*Just change the IP address examples of (10.10.0.2) to the target of your mutual key exchange.  It doesn't matter if the server is on a LAN or WAN (well unless the server is behind a firewall and you cannot SSH into it).

Code:
ssh-keygen -t rsa
cat ~/.ssh/id_rsa.pub|ssh 10.10.0.2 tee -a ~/.ssh/authorized_keys

ssh 10.10.0.2 ssh-keygen -t rsa
ssh 10.10.0.2 cat ~/.ssh/id_rsa.pub |tee -a ~/.ssh/authorized_keys


  • *tee simply just takes stdinput and redirects it to where ever you say.
  • *on some systems you'll need to chmod 600 ~/.ssh/authorized_keys


If you want to do it the hard way, on both servers you can just run this command:

ssh-keygen -t rsa

Just keep hitting enter, and then copy and paste the contents of:

~/.ssh/id_rsa.pub into the other servers "~/.ssh/authorized_keys" file.

Be careful not to add any extra spaces or line breaks when copying it or it won't work.

 

 

 


  • How to disable Google Fonts in Wordpress
  • Unable to load dynamic library /usr/lib64/php/modules/php_openssl
  • mysqld in Linux hacked
  • W: GPG error: http://archive.debian.org squeeze Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY AED4B06F473041FA NO_PUBKEY 64481591B98321F9
  • cannot mount kvm ntfs image
  • h264 DVR security camera footage cannot be played
  • dhcpd.conf how to secure so only known and allowed clients will be given dhcpd IP address leases
  • Thunderbird E-mail List Blank White but e-mails still clickable and viewable
  • css responsive images
  • responsive table without changing much code solution
  • yum how to install old obsolete packages
  • PHP Howto Store Value of Included File Output Into Variable
  • PHP Migration from 5.3 to 5.4+ and dealing with deprecated functions
  • ffmpeg vidstab to stabilize video
  • userdel user userdel: cannot lock /etc/passwd; try again later.
  • mdadm how to mount inactive array
  • How to find and mount mdadm arrays automatically
  • M2Crypto.SSL.Checker.WrongHost: Peer certificate subjectAltName does not match host, expected fedora-archive.ip-connect.vn.ua, got DNS:mirror.ip-connect.vn.ua
  • [Wed Sep 20 15:34:44 2017] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Wed Sep 20 15:34:44 2017] [error] Init: Unable to read server certificate from file /www/ssl-certs/server.crt [Wed Sep 20 15:34:44 2017] [error] SSL Library Err
  • linux how to answer yes to copy