Difference between revisions of "Ssh-agent"
Jump to navigation
Jump to search
Line 7: | Line 7: | ||
ssh-add - <<< $(echo "${{ secrets.PRIVATE_SSH_KEY }}") | ssh-add - <<< $(echo "${{ secrets.PRIVATE_SSH_KEY }}") | ||
ssh-keyscan -H 10.x.x.x >> ~/.ssh/known_hosts | ssh-keyscan -H 10.x.x.x >> ~/.ssh/known_hosts | ||
+ | ``` | ||
+ | |||
+ | # Windows | ||
+ | |||
+ | ``` | ||
+ | Start-Service ssh-agent | ||
+ | ssh-add $HOME\.ssh\mysshkey | ||
+ | ssh myremoteuser@myremotehost | ||
``` | ``` |
Revision as of 09:55, 27 July 2024
ssh-agent bash -c 'ssh-add /somewhere/yourkey; git clone git@github.com:user/project.git'
ssh-agent bash ssh-add - <<< $(echo "${{ secrets.PRIVATE_SSH_KEY }}") ssh-keyscan -H 10.x.x.x >> ~/.ssh/known_hosts
Windows
Start-Service ssh-agent ssh-add $HOME\.ssh\mysshkey ssh myremoteuser@myremotehost