retspen / webvirtcloud

WebVirtCloud is virtualization web interface for admins and users
1.7k stars 372 forks source link

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

Open tree1123 opened 3 years ago

tree1123 commented 3 years ago

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

catborise commented 3 years ago

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

cyberfarer commented 2 years ago

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.