Request for auto connect for the snap charmed-openstack-upgrader

I’ve already asked for auto connection on charmed-openstack-upgrader on this post, but we discovered that we also need ssh-public-keys interface. The snap uses python-libjuju and we use scp to make backups of mysql-innodb-cluster. Without this interface, we receive permission denied:

/usr/bin/ssh: Permission denied
2023-10-03 13:36:48 [ERROR] Unexpected error occurred
2023-10-03 13:36:48 [ERROR] command failed: ['scp', '-i', '/home/ubuntu/.local/share/juju/ssh/juju_id_rsa', '-o', 'StrictHostKeyChecking=no', '-q', '-B', 'ubuntu@10.18.2.114:/var/backups/mysql/mysqldump-all-databases-202310031336.gz', '/home/ubuntu/.local/share/cou/mysqldump-all-databases-202310031336.gz']

/home/ubuntu/.local/share/cou/log/cou-20231003135733.log

So I would like to ask automatic connection for this interface and keep juju-client-observe, dot-local-share-cou and personal-files.

Thanks

Can you just confirm that it’s definitely the public key interface you need? +1 if that’s the case, but the reason I ask for confirmation is that the error text above is referencing a private key file. I can see how the connection would fail if a previous step failed to take the public key and inject it on the remote host though.

Hi @dclane. I confirm that is the public key interface that I need. The juju-client-observe already has read access to the private key that you see in the command that fails.

To run scp the host needs to have read access to the public key to inject it on the remote host as you said.

Thanks

Awesome. +1 from me then. Thanks for clarifying.

+1 from me to auto-connect ssh-public-keys interface for this snap

thanks

+2 votes for, 0 votes against, granting auto-connect of interface ssh-public-keys to snap charmed-openstack-upgrader. This is now live.