# - - # # - Install SSH in Manjaro Linux - Tested in i3 - # sudo pacman -S openssh; sudo systemctl enable sshd; sudo systemctl start sshd; # - - # # - ssh keygen for automatic ssh login - # # - In terminal - Copy & paste - # cd ~/.ssh; ssh-keygen -t rsa; 1. Press enter - For standard file destination in the /home/user/.ssh folder. 2. Enter phrase for public key and press enter - twice. # - - # # - - # # - Create ssh key (Server to Server Connection) - # # - - # :a - Login Server "A" & generate a pair of keys, don't enter a passphrase ssh-keygen -t rsa; # - - # :b - Create .ssh directory on Server "B" ssh 192.168.1.200 mkdir -p ~/.ssh ssh is_derayo@192.168.1.200 mkdir -p ~/.ssh ssh 192.168.1.200 mkdir -p ~/.ssh/Hola-Hola ssh is_derayo@192.168.1.200 mkdir -p ~/.ssh/Hola-Hola # - - # :c - Append Server "A" public key into Server "B" cat ~/.ssh/id_rsa.pub | ssh is_derayo@192.168.1.200 'cat >> ~/.ssh/authorized_keys' # - - # :d - Other ssh commands to run from Server to Server # - Cat - # ssh 192.168.1.200 cat ~/.ssh/authorized_keys; ssh is_derayo@192.168.1.200 cat ~/.ssh/authorized_keys; # - scp - # Copy file from Server A to Server B scp /path/to/file username@a:/path/to/destination scp /home/Data3/Images/Programs/Linux.Img/BackupRecoverySystem.Img/SystemRescueCD-x86-4.5.2.iso is_derayo@192.168.1.200:/home/Data/Images/Programs/Linux.Img/BackupRecoverySystem.Img/ SystemRescueCD-x86-4.5.2.iso scp BootRepairDisk.Img/* is_derayo@192.168.1.200:/home/Data/Images/Programs/Linux.Img/BackupRecoverySystem.Img/BootRepairDisk.Img # - scp directory - # scp -r /local/directory remote_username@10.10.0.2:/remote/directory scp -r BootRepairDisk.Img is_derayo@192.168.1.200:/home/Data/Images/Programs/Linux.Img/BackupRecoverySystem.Img/ scp "Parted_Magic-("* is_derayo@192.168.1.200:/home/Data/Images/Programs/Linux.Img/BackupRecoverySystem.Img/Parted_Magic.Img/ Copy file from Server B to Server A scp username@b:/path/to/file /path/to/destination # - - # # - SSH key asking me for a passphrase? - # eval `ssh-agent -s` ssh-add ~/.ssh/id_rsa ssh-add -K ~/.ssh/id_rsa # - - # # - MacOS - # One fix is to add the following to your ~/.ssh/config file: # - 1. vim .ssh/config - # # - This worked for me, paste the following text - # Host * AddKeysToAgent yes IdentityFile ~/.ssh/id_rsa UseKeychain yes Host * UseKeychain yes AddKeysToAgent yes IdentityFile ~/.ssh/id_rsa IdentityFile ~/.ssh/id_25519 # - 2. Go to create your new password in keychain: - # How to Use Keychain to Manage Mac Passwords a. Open finder b. Go to Applications c. Utilities d. Keychain access e. Go to Passwords f. Add with + g. Keychain name: uServerHome-sshPassword h. Account Name: is_derayo i. Password: Connecticut, Nicaragua, Guatemala, NewJersey j. Click Add button k. Done. Now the agent supplies the credentials instead of me having to type in my passphrase. # - - # # - When this error happen: - # Could not open a connection to your authentication agent. # - Do this: - # exec ssh-agent bash eval `ssh-agent -s` ssh-add ~/.ssh/id_rsa