[GH-ISSUE #439] sudo -u www-data ssh-copy-id root@compute1 error? #270

Open
opened 2026-02-27 15:58:03 +03:00 by kerem · 2 comments
Owner

Originally created by @tree1123 on GitHub (May 14, 2021).
Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/439

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

Originally created by @tree1123 on GitHub (May 14, 2021). Original GitHub issue: https://github.com/retspen/webvirtcloud/issues/439 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
Author
Owner

@catborise commented on GitHub (May 14, 2021):

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

<!-- gh-comment-id:841129051 --> @catborise commented on GitHub (May 14, 2021): Before copy it. You should generate an id with ssh-keygen
Author
Owner

@cyberfarer commented on GitHub (Apr 14, 2022):

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.

<!-- gh-comment-id:1098587472 --> @cyberfarer commented on GitHub (Apr 14, 2022): 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtcloud#270
No description provided.