Passphrases and ssh agent

Figure 977. Tedious: Passphrase required for each remote login Slide presentation
>ssh root@learn.mi.hdm-stuttgart.de
Enter passphrase for key '/home/goik/.ssh/id_ed25519': 
root@learn:~# exit
logout
Connection to learn.mi.hdm-stuttgart.de closed.
>ssh root@klausur.mi.hdm-stuttgart.de
Enter passphrase for key '/home/goik/.ssh/id_ed25519': 
root@klausur:~# exit
logout
Connection to klausur.mi.hdm-stuttgart.de closed.

Figure 978. Solving the passphrase issue Slide presentation
Solving the passphrase issue

Figure 979. Behind the scenes: How does it work? Slide presentation
>printenv |grep SSH_AUTH_SOCK
SSH_AUTH_SOCK=/run/user/21100/keyring/ssh
>ps aux|grep ssh-agent
goik        6671  ... /usr/bin/ssh-agent -D -a /run/user/21100/keyring/.ssh    
>ls -al /run/user/21100/keyring/ssh 
srwxr-xr-x. 1 goik goik 0 Apr 12 09:58 /run/user/21100/keyring/ssh

Note: The s in srwxr-xr-x indicates a domain socket.


exercise No. 4

ssh-agent installation

Q:

Install ssh-agent or related on your system. Then try multiple ssh logins. Entering your passphrase should now be required only once per login session.

exercise No. 5

MI Gitlab access by ssh

Q:

Read Use SSH keys to communicate with GitLab and configure your MI Gitlab profile for ssh access.

  1. Use git clone git@gitlab.mi.hdm-stuttgart.de:... for cloning a project to your local machine.

  2. Try git push and git pull operations as well.