Remembering id_rsa every session for web shell user?

Discussion in 'General' started by bradgillap, Feb 6, 2023.

  1. bradgillap

    bradgillap New Member

    Hello,

    I have ispconfig3 with a site on top of Debian.
    My shell user works great for the site but I'm in a situation where I need to push/pull from a git server every so often. This required a public/private key of course. So I installed that in ~/.ssh in the shell users account. No jailkit in place here or necessary at the moment.

    Every single time I login through putty with this shell account. If I want my keys to be accepted for pushing/pulling from the git server I have to run these two commands.

    Code:
    eval `ssh-agent`
    ssh-add ~/.ssh/id_rsa

    Is there a better way to get my keys in place so that I don't have to do this every single new ssh session to my server just to sync with the git server? I'm assuming this is like adding a new line to authorized_keys or something every single time as well which feels messy.

    Maybe just the way I've done this means my session ID is unique each time and that's just how it is?
     

Share This Page