ssh-agent
SSH,
Syntax
eval $(ssh-agent -s) ssh-add [keyfile]
Parameters
| Parameters | Description | Examples | Level |
|---|---|---|---|
-s |
Bourne shell command | eval $(ssh-agent -s) |
Common |
-k |
agent | ssh-agent -k |
Common |
-t |
agent | ssh-add -t 3600 ~/.ssh/id_ed25519 |
Advanced |
-A ForwardAgent |
SSH agent() | ssh -A user@host |
Advanced |
-l |
agent | ssh-add -l |
Common |
Examples
agent
eval $(ssh-agent -s) ssh-add ~/.ssh/id_ed25519
, SSH
ssh-add -l
agent
ssh-add -t 7200 ~/.ssh/id_ed25519
agent 2
agent
ssh -A user@bastion-host
Common Errors
Could not open a connection to your authentication agentagent, eval $(ssh-agent -s)
The agent has no identitiesagent, ssh-add
Tips
- ~/.bashrc ~/.zshrc eval $(ssh-agent -s)
- Agent (-A),
- macOS ssh-add --apple-use-keychain