0

I set up a VPC on Amazon Web Services where I ssh into multiple Ubuntu AMI's from one bastion host AMI. I added:

ssh-add /home/myuser/.ssh/aws.pem

to my .bashrc file on my local machine (Ubuntu 16.04 Desktop) so that I would not have to use 'ssh-add' every time I restart my computer.

While it is working, I get this annoying message every time I open my terminal:

'Identity added: /home/myuser/.ssh/aws.pem (/home/myuser/.ssh/aws.pem)'

How do I get rid of this message? I checked the Ubuntu manpages under 'ssh-add' but couldn't find anything. Sorry if I've missed anything in plain sight.

1 Answers1

0

Just add a conditional around your .bashrc line to check if the key has already been added, and if so, skip the command.

EEAA
  • 108,414
  • 18
  • 172
  • 242