I just got a Google Slate, largely because it can run Linux programs. By default, ssh-agent is not running when you open a terminal window. To add it, I created and enabled a systemd service for ssh-agent and I created the environment variable.
Create ~/.config/systemd/user/ssh-agent.service
[Unit] Description=ssh-agent service [Service] Type=simple Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK [Install] WantedBy=default.target
Enable the service by running this.
systemctl enable –user ssh-agent.service
Check that it starts properly.
artzemon@penguin:~$ systemctl start --user ssh-agent.service artzemon@penguin:~$ systemctl status --user ssh-agent.service ● ssh-agent.service - ssh-agent service Loaded: loaded (/home/artzemon/.config/systemd/user/ssh-agent.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2018-12-05 13:31:46 UTC; 11min ago Main PID: 98 (ssh-agent) CGroup: /user.slice/user-1000.slice/[email protected]/ssh-agent.service └─98 /usr/bin/ssh-agent -D -a /run/user/1000/ssh-agent.socket
Add this to ~/.profile to set the environment variable for the socket.
if [ -e $XDG_RUNTIME_DIR/ssh-agent.socket ]; then export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket fi
Shut down the Linux VM by hovering over the terminal icon in the ChromeOS shelf, right-click, and choose “Shut Down Linux.”
ssh-agent will be running the next time you start the Linux VM.
Jule Turnoy says
You speak/ write advanced computerese. How about a Dictionary for Dummies when the plane is up and flying?