Skip to content

simple bashrc script to load ssh-agent and set ssh keys on startup of bash terminal. tested on git bash for windows.

License

Notifications You must be signed in to change notification settings

Spat915/ssh-keychain-preload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

SSH KEYCHAIN PRELOAD

Usage:

  1. Clone and copy .bashrc into your home directory. On Linux-based systems, that's ~/. On Windows systems, that's C:\Users\<Username>\.
  2. Edit the file to change the /w/path... entries at the top to the path(s) to your ssh keys. You can put as many or as few keys as you like here. The script comes with 2 instances outlined.
  3. Start a bash shell (might need to re-source the file in Linux). The bashrc should automatically attempt to load the ssh keys you defined.
    • If the keys need passwords, you will be prompted for them before the shell allows you to type other commands.

Notes:

On windows, the ssh-agent runs as a service, so you only need to re-enter your ssh passwords if you a) kill the service, or b) reboot.

The keys to add to the keychain should have been generated by the ssh-keygen command. Keys generated elsewhere might not work (PuTTY ppk keys for instance).

The paths in bashrc should be to your private keys, not the public counterparts.

About

simple bashrc script to load ssh-agent and set ssh keys on startup of bash terminal. tested on git bash for windows.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages