ssh-agent

Connecting to currently running ssh-agent

Connecting to currently running ssh-agent After creating an agent, it automatically detaches itself from the parent process. someUser@MyPC:~$ eval "$(ssh-agent -s)" Agent pid 10222 someUser@MyPC:~$ ps -e –forest | grep ssh-agent 10222 ? 00:00:00 ssh-agent When I close the terminal and open a new one to create another agent, there are now two agents running. …

Total answers: 1

manage many ssh keys via ssh-agent

manage many ssh keys via ssh-agent I use keepassxc (my password manager) to manage my ssh keys. This means the keys are stored within the database (not stored on disk in a traditional way). When I unlock my password database, all keys are added to the agent. However, with a growing list of ssh keys, …

Total answers: 1

What is the key type for the ssh_host_key file in SSH?

What is the key type for the ssh_host_key file in SSH? In Ubuntu and Fedora in the /etc/ssh/ directory exists the following files: ssh_host_key ssh_host_dsa_key (not available in Fedora) ssh_host_ecdsa_key ssh_host_ed25519_key ssh_host_rsa_key For the same set of these files, exists others with the same names but with the .pub extension. I know that dsa, ecdsa, …

Total answers: 1

Start a system wide SSH agent

Start a system wide SSH agent Currently, I have commands to start the SSH agent in my .bashrc file. The trouble is that this only works in a particular terminal – each time I open a terminal, I’m asked for my private key’s passphrase. Is there a way to open the SSH agent so that …

Total answers: 1

Ubuntu ssh-ing Ubuntu on home network

Ubuntu ssh-ing Ubuntu on home network I have a laptop (Ubuntu, wifi) and PC (Ubuntu, Ethernet) connected to my home router. I’d like to be able to ssh from laptop to PC to copy and run executables. I don’t need a gui, just running htop and gdb at most. How simple is this to achieve? …

Total answers: 1

ssh-add without prompt

ssh-add without prompt I am working on some shell and I encountered the following line: cat /ssh/sshkey | tr -d ‘r’ | ssh-add – This code get a key and add it to an agent. This work on its current environment, but when I try it on another VM, I get the following: Error loading …

Total answers: 1

Automatically running code before closing SSH connection

Automatically running code before closing SSH connection I’m remotely connecting to a shared server and I would like to have a line of code executed automatically in the remote machine before I close the connection (e.g. by pressing Ctrl+D). More specifically, I’d like to kill the SSH agent before I leave, as I noticed it …

Total answers: 1

How can I suppress host key checking with ssh-agent

How can I suppress host key checking with ssh-agent I have a script with this snippet: ssh-agent bash -c "ssh-add $SOME_KEY; git submodule update –init foo" The script hangs while asking the user: RSA key fingerprint is SHA256:[the fingerprint] Are you sure you want to continue connecting (yes/no)? How can I make the script continue …

Total answers: 1

ssh-add returns with: "Error connecting to agent: No such file or directory"

ssh-add returns with: "Error connecting to agent: No such file or directory" ssh-add alone is not working: Error connecting to agent: No such file or directory How should I use that tool? Asked By: Wong Jia Hau || Source You need to initialize ssh-agent first. You can do this in multiple ways. Either by starting …

Total answers: 5

gpg-agent refuses SSH keys with ssh-add reporting "agent refused operation"

gpg-agent refuses SSH keys with ssh-add reporting "agent refused operation" I’m using openssh7.5p1 and gnupg 2.1.21 on arch linux (these are the default versions that come with arch). I would like to use gpg-agent as an ssh agent. I put the following in my ~/.gnupg/gpg-agent.conf: pinentry-program /usr/bin/pinentry-qt enable-ssh-support Arch automatically starts a gpg-agent from systemd, …

Total answers: 2

Why eval the output of ssh-agent?

Why eval the output of ssh-agent? In order to run ssh-agent I have to use: eval $(ssh-agent) Why is it necessary to eval the output of ssh-agent? Why can’t I just run it? Asked By: jx12345 || Source ssh-agent outputs the environment variables you need to have to connect to it: shadur@proteus:~$ ssh-agent SSH_AUTH_SOCK=/tmp/ssh-492P67qzMeGA/agent.7948; export …

Total answers: 1

sign_and_send_pubkey: signing failed: agent refused operation

sign_and_send_pubkey: signing failed: agent refused operation Running xubuntu 16.04, with xfce, I’m trying to use ssh keys with passphrases. I would like to add my passphrased key to my ssh-agent, but I don’t know why I can’t add it. I don’t have gnome keyring enabled or anything alike in my startup. ssh-add privatekey, adds the …

Total answers: 3

How to enable diffie-hellman-group1-sha1 key exchange on Debian 8.0?

How to enable diffie-hellman-group1-sha1 key exchange on Debian 8.0? I am unable to ssh to a server that asks for a diffie-hellman-group1-sha1 key exchange method: ssh 123.123.123.123 Unable to negotiate with 123.123.123.123 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1 How to enable the diffie-hellman-group1-sha1 key exchange method on Debian 8.0? I …

Total answers: 5

How to start and use ssh-agent as systemd service?

How to start and use ssh-agent as systemd service? How to start ssh-agent as systemd service? There are some suggestions in the net, but they are not complete. How to add automatically unencrypted keys if ssh-agent service was started successfully? Probably, adding keys from the list of ~/.ssh/.session-keys would be good. How to set SSH_AUTH_SOCK …

Total answers: 2

"ssh-add -d" refused to remove identity

"ssh-add -d" refused to remove identity In order to forget private keys passphrase (id_rsa) i usually run: ssh-add -D # to forget all loaded identities ssh-add -d # to forget primary identity ($HOME/.ssh/id_rsa) Now with macOS Sierra v10.12.1 i get this error: $ ssh-add -D All identities removed. $ ssh-add -d Could not remove identity …

Total answers: 8

ssh-add add all private keys in .ssh directory

ssh-add add all private keys in .ssh directory In my day-to-day, I need to ssh to various machines, all of which I have a different private key for. When I start a new shell session – only my default id_rsa is added to the ssh key chain – I have been running ssh-add ~/.ssh/* However …

Total answers: 4

`ssh-agent` asks passphrase after it has been added

`ssh-agent` asks passphrase after it has been added I’m new to the ssh-agent and encounter what I identify as a “bug“. Situation I have a passphrase-protected private key. I want to use the ssh-agent so I do not write the passphrase each time I ssh. ssh-agent adds the private key (according to ssh-agent -l displaying …

Total answers: 2

Save SSH key passphrase using keychain with –noask option

Save SSH key passphrase using keychain with –noask option I want to use keychain to manage passphrase prompt for SSH keys, but it should 1) ask it only when I’m actually using key and 2) save it for some period of time after that. Currently I’ve 2 options: $ eval `keychain –eval –agents ssh id_rsa` …

Total answers: 1

Detecting the remaining lifetime of an ssh-agent identity

Detecting the remaining lifetime of an ssh-agent identity The ssh-add command lets you specify the lifetime of an identity being added to ssh-agent. For example, if I type ssh-add -t 1h the identify will expire after 1 hour. I can then list the identities currently represented by the agent using ssh-add -l. Is there a …

Total answers: 1