‘undo’ ssh-add

  • List all available keys.
  • Remove a key.
  • List all available keys.

fix ssh file permissions

user@client~$ chown $USER:$USER -R $HOME/.ssh
user@client~$ chmod 700 $HOME/.ssh
user@client~$ find $HOME/.ssh/ -type f -exec chmod 600 {} +
user@client~$ find $HOME/.ssh/ -type f \( -name '*.pub' \) -exec chmod 644 {} +
Assuming that your public key files are named anything ending with “.pub”. Use the find command to recursively (see as well here) set file permissions. This allows you to organize multiple key files into subdirectories within the .ssh folder.

copy folders recursively via ssh (no password but key file)

From local to remote: From remote to local: