Adding a SSH key to an existing experiment

38 views
Skip to first unread message

Divyanshu Saxena

unread,
Jun 7, 2022, 7:57:33 PM6/7/22
to cloudlab-users
Hi,
We have an experiment in our group (WISR-PG0).
Experiment: lexu-127097
I need access to this experiment to add on some experiments. However, I understand that only those users can access the machines whose SSH keys have been added in the account of the experiment creator. Is there any way we can add the SSH keys in the creator's account, so that I can access the experiment without having to create a new experiment?
Please let me know.

Thanks.
Divyanshu 

Leigh Stoller

unread,
Jun 8, 2022, 8:06:38 AM6/8/22
to cloudla...@googlegroups.com

> I need access to this experiment to add on some experiments. However, I understand that only those users can access the machines whose SSH keys have been added in the account of the experiment creator. Is there any way we can add the SSH keys in the creator's account, so that I can access the experiment without having to create a new experiment?

Hi. All members of your project get accounts on the nodes in all of
the experiments in the project. As long as you have ssh public keys
uploaded to your Portal web account. Are you running an ssh key agent
to forward your ssh private keys?

If you are having problems, please tell us what node you cannot log
into and send the output of “ssh -v” which turns on debugging.

Leigh


Divyanshu Saxena

unread,
Jun 8, 2022, 12:45:18 PM6/8/22
to cloudlab-users
Hi Leigh,
Thanks for your response. I do have ssh public keys added on my account. I can start experiments and log into the nodes there without any problem.

Here is the output when I try to log into hp011.utah.cloudlab.us

OpenSSH_7.6p1 Ubuntu-4ubuntu0.5, OpenSSL 1.0.2n  7 Dec 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to hp011.utah.cloudlab.us [128.110.218.50] port 22.
debug1: Connection established.
debug1: identity file /home/divyanshu/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file /home/divyanshu/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/divyanshu/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/divyanshu/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/divyanshu/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/divyanshu/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/divyanshu/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/divyanshu/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.5
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
debug1: match: OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 pat OpenSSH* compat 0x04000000
debug1: Authenticating to hp011.utah.cloudlab.us:22 as 'dsaxena'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20...@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20...@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:bB4TBZMIEhrtJN2mb/Mzn8fvSRUBUC+UamxqkhCU7HA
debug1: Host 'hp011.utah.cloudlab.us' is known and matches the ECDSA host key.
debug1: Found key in /home/divyanshu/.ssh/known_hosts:464
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: RSA SHA256:ZDG41OtQRyzu6vNXBbeciUH6eN7cBv23x006m36NoyY /home/divyanshu/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Trying private key: /home/divyanshu/.ssh/id_dsa
debug1: Trying private key: /home/divyanshu/.ssh/id_ecdsa
debug1: Trying private key: /home/divyanshu/.ssh/id_ed25519
debug1: No more authentication methods to try.
dsa...@hp011.utah.cloudlab.us: Permission denied (publickey).

Note: When I log into a node of an experiment started by me, the log looks something like:
...
debug1: Offering public key: RSA SHA256:ZDG41OtQRyzu6vNXBbeciUH6eN7cBv23x006m36NoyY /home/divyanshu/.ssh/id_rsa
debug1: Server accepts key: pkalg rsa-sha2-512 blen 279
debug1: Authentication succeeded (publickey).
Authenticated to node0.bpf-exp.wisr-pg0.utah.cloudlab.us ([128.110.217.21]:22).
...

Please let me know how to proceed.

Divyanshu

Leigh Stoller

unread,
Jun 8, 2022, 12:50:32 PM6/8/22
to cloudla...@googlegroups.com

> Hi Leigh,
> Thanks for your response. I do have ssh public keys added on my account. I can start experiments and log into the nodes there without any problem.

Hi. So I did discover that a bug crept in, about week or so ago.
Code merge error. But the result is that the experiment you mentioned
(lexu-127097) did in fact not get the accounts it should have. I
installed a fix for that this morning, but that will not change
lexu-127097. Only experiments going forward.

Leigh


Reply all
Reply to author
Forward
0 new messages