webvirtcloud icon indicating copy to clipboard operation
webvirtcloud copied to clipboard

sudo -u www-data ssh-copy-id root@compute1 error?

Open tree1123 opened this issue 3 years ago • 2 comments

i install webvirtcloud in ubuntu 18.04 success

but when i want to connect a computer and enter

sudo -u www-data ssh-copy-id root@compute1

show me

/usr/bin/ssh-copy-id: 59: cd: can't cd to /root /usr/bin/ssh-copy-id: ERROR: No identities found

tree1123 avatar May 14 '21 08:05 tree1123

Before copy it. You should generate an id with ssh-keygen

catborise avatar May 14 '21 09:05 catborise

Try ...

su www-data -s /bin/bash cd ~ ssh-keygen

Copy the content of /var/www/.ssh/id_rsa.pub to your hypervisor host and paste into /root/.ssh/authorized_keys - be careful to not copy any whitespace or miss any characters.

then back to the guest ssh root@hypervisor accept fingerprint and you should be good to go.

cyberfarer avatar Apr 14 '22 00:04 cyberfarer