I've started using Amazon EC2 recently. I've setup a "permanent" Spot instance, I log in using ssh keys, then I clone some GitHub repos (using another ssh key pair).
The problem is, dispite the fact that EC2 instance is permanent, each new login session I do, I have to setup the ssh keys all over again (both to log in to EC2, and to pull repo from GitHub into EC2), with the following commands:
> eval "$(ssh-agent -s)"
> ssh-add ~/.ssh/mykey
Why isn't this permanently added?
ssh-agentprocess. – Panki Jun 14 '23 at 17:19ssh-add ~/.ssh/mykeyeach time? – Danijel Jun 15 '23 at 07:43