I'm running FreeBSD 13.1 as a VM that I use to learn and work on project.
I would like to automatically add my ssh key to the ssh-agent.
I've create the following bash script to run on demand:
I then chmod +x to my file and can execute it.
Typing these exact same commands on my bash prompt does the same output but seems to add the key successfully and allow the ssh
Thanks in advance!
I would like to automatically add my ssh key to the ssh-agent.
I've create the following bash script to run on demand:
#!/usr/bin/env bash
# File: addMyKeys.sh
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/GitHub
I then chmod +x to my file and can execute it.
After typing my passphrase it looks like it is all good$ addMyKeys.sh
Agent pid 1071
Enter passphrase for /home/bob/.ssh/GitHub:
However I'm still unable to establish my ssh connectionIdentity added: /home/bob/.ssh/GitHub (myname@mydomain.com)
Typing these exact same commands on my bash prompt does the same output but seems to add the key successfully and allow the ssh
$ eval "$(ssh-agent -s)"
Agent pid 1071
$ ssh-add ~/.ssh/GitHub
Enter passphrase for /home/bob/.ssh/GitHub:
Identity added: /home/bob/.ssh/GitHub (myname@mydomain.com)
$
Anyone would nice enough to help my understand what I am missing?$ ssh -T git@github.com
Hi bob! You've successfully authenticated, but GitHub does not provide shell access.
Thanks in advance!