recentpopularlog in

kme : ssh-agent   19

ssh agent - ssh-add under cygwin - Server Fault
I totally did this.

OK, that other Serverfault.com answer has a typo.

The right thing you want to run is:
<code class="language-bash">eval `ssh-agent`</code>
ssh-agent spits out a bunch of shell statements to set environmental variables. The eval runs them in the current shell. You can invoke ssh-agent that way, or run ssh-agent and then copy-paste its output into your current shell for the same effect.
ssh  ssh-agent  cygwin  linux  unix  doh  solution 
october 2019 by kme
linux - What does "key_load_public: no such file or directory" mean? - Super User | https://superuser.com/
It means literally what it says: there is no such file or directory that ssh wanted to access.

However, it talks about the file mentioned below, not above. You have just the regular public keys, but you do not have the SSH certificates for them (presumably because you just don't need them). OpenSSH however will always try to load the associated .pub-cert file for each identity key.
ssh  ssh-agent  debugging  publickeyauthentication 
january 2018 by kme
keyring - Private SSH key with password no longer stays unlocked for session - elementary OS Stack Exchange | https://elementaryos.stackexchange.com/
Script 90x11-common_ssh-agent should somehow start your ssh-agent. But not add the keys. If you want to add a key with the first usage, you can configure ssh to do so in ~/.ssh/config:

AddKeysToAgent yes
ssh  ssh-agent  keyring  elementaryos  ubuntu  annoyance  solution 
january 2018 by kme
SSH agent forwarding and screen
To have SSH within a screen session use the symlink, add the following line to ~/.screenrc:

setenv SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock

To update the symlink we'll use the ~/.ssh/rc file which is executed by SSH on each connection. This can be any executable file, so something like the following script will do:

if test "$SSH_AUTH_SOCK" ; then
ln -sf $SSH_AUTH_SOCK ~/.ssh/ssh_auth_sock
fi


Also, from the comments, the same thing can be done in a ~/.bashrc:

if [[ -n "$SSH_TTY" && -S "$SSH_AUTH_SOCK" ]]; then
ln -sf $SSH_AUTH_SOCK ~/.ssh/ssh_auth_sock
fi


And for tmux (courtesy: https://stackoverflow.com/a/23187030)
# fix ssh agent when tmux is detached
setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock
screen  tmux  ssh  ssh-agent  dotfiles  solution 
june 2016 by kme
How to auto-update SSH agent environment variables when attaching to existing tmux sessions - Stack Overflow
There's an excellent gist by Martijn Vermaat, which addresses your problem in great depth, although it is intended for screen users, so I'm adjusting it for tmux here.

To summarize:

create ~/.ssh/rc if it doesn't exist yet, and add the following content:

#!/bin/bash

# Fix SSH auth socket location so agent forwarding works with tmux
if test "$SSH_AUTH_SOCK" ; then
ln -sf $SSH_AUTH_SOCK ~/.ssh/ssh_auth_sock
fi

Make it work in tmux, add this to your ~/.tmux.conf:

# fix ssh agent when tmux is detached
setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock

solution  tmux  screen  ssh-agent  dotfile  authentication 
june 2016 by kme
SSH keys - ArchWiki
Start ssh-agent with systemd user

It is possible to use the systemd/User facilities to start the agent.

~/.config/systemd/user/ssh-agent.service

[Unit]
Description=SSH key agent

[Service]
Type=forking
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
ExecStart=/usr/bin/ssh-agent -a $SSH_AUTH_SOCK

[Install]
WantedBy=default.target

Add export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" to your shell's startup file, for example .bash_profile for Bash. Then enable or start the service.


Another helpful tip:

\
All the user services will be placed in ~/.config/systemd/user/. If you want to run services on first login, execute systemctl --user enable service for any service you want to be autostarted. </blockquote
linux  authentication  ssh-agent  ssh  publickeyauthentication  maybesolution 
june 2016 by kme

Copy this bookmark:





to read