Skip to content

Instantly share code, notes, and snippets.

@pkhuong
Forked from parsley42/README.md
Created May 3, 2021 15:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pkhuong/1aa13d99619d3c6869a7ce7e280eda00 to your computer and use it in GitHub Desktop.
Save pkhuong/1aa13d99619d3c6869a7ce7e280eda00 to your computer and use it in GitHub Desktop.
Chromebook ssh-agent setup

Setting up ssh-agent in Linux/Crostini on Chromebook

  • Create your user systemd directory:
$ mkdir -p .config/systemd/user
  • Edit the unit file .config/systemd/user/ssh-agent.service:
[Unit]
Description=SSH key agent

[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:
$ systemctl --user enable ssh-agent
  • Add setting of SSH_AUTH_SOCK to end of .bashrc:
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent.socket
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment