For some reason, I did NOT know about this ... until I found about it, and now I know :-)
I've been happily SSHing into the VMs that comprise my IBM Cloud Private (ICP) environment, and less-than-happily needing to find/copy/paste the passphrase of my SSH key pair ....
So I'd run the command: -
ssh root@dmhicp-mgmtmaster.fyre.ibm.com
and then have to go off to my password vault to find the pass phrase for my public key: -
~/.ssh/id_rsa.pub
Well, no longer, thanks to a combination of ssh-add and the native macOS Keychain.
I used this command: -
ssh-add -k ~/.ssh/id_rsa
and this command: -
ssh-add -l
to validate that it'd been added ( this returns a fingerprint ) and this command: -
ssh-add -L
to show the public key in its entirety.
The ssh-add command is documented here: -
https://www.ssh.com/ssh/add
I also ended up with a config file in my ~/.ssh directory: -
cat ~/.ssh/config
Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa
probably because I've also been tinkering with GitHub: -
Connecting to GitHub with SSH
but the TL;DR; is that I can now access my Ubuntu VMs without a darn password OR passphrase.
Which is nice!
Geeking in technology since 1985, with IBM Development, focused upon Docker and Kubernetes on the IBM Z LinuxONE platform In the words of Dr Cathy Ryan, "If you don't write it down, it never happened". To paraphrase one of my clients, "Every day is a school day". I do, I learn, I share. The postings on this site are my own and don’t necessarily represent IBM’s positions, strategies or opinions. Remember, YMMV
Subscribe to:
Post Comments (Atom)
TIL - read-only variables in Linux
A co-worker was seeing an exception: - line 8: TMOUT: readonly variable when trying to SCP a file from a remote Linux box. I did some digg...
-
After an unscheduled reboot of the VMs that host my K8s cluster, I was struggling to work out why the kubelet wasn't starting properly...
-
I hit a wee snag earlier today, whilst attempting to unpack some IBM software on my NAS. Being a command-line junkie, I'd SSH'd into...
-
I've just spent ~1 hour trying to get a pair of Powerline adapters to .... pair. This involved pressing a "Pair" button on one...
No comments:
Post a Comment