Skip to content

id_rsa.pub location when adding host using SSH Auth #478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/installguide/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ Basic Zone Configuration

Before adding the host in CloudStack do the following,

- Copy the SSH public key from /var/cloudstack/management/.ssh/id_rsa.pub on the management server
- Copy the SSH public key from /var/lib/cloudstack/management/.ssh/id_rsa.pub on the management server
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Copy the SSH public key from /var/lib/cloudstack/management/.ssh/id_rsa.pub on the management server
- Copy the SSH public key from ~cloud/.ssh/id_rsa.pub on the management server

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a valid, ~cloud/.ssh/id_rsa.pub - doesn't exist. Who should create it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the cloud user is created by cloudstack.

I tested on two management servers.
the cloud users have different home directories on ubuntu and rocky. This is why I suggested.

  • ubuntu 24.04
# ls -l ~cloud/.ssh/id_rsa.pub 
-rw-r--r-- 1 cloud cloud 594 Mar 14 16:19 /var/lib/cloudstack/management/.ssh/id_rsa.pub
  • rocky8
# ls -l ~cloud/.ssh/id_rsa.pub 
-rw-r--r--. 1 cloud cloud 202 Mar 14 10:14 /var/cloudstack/management/.ssh/id_rsa.pub

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think @weizhouapache 's suggestion is valid. We could add a remark that "the actual user may differ depending on your configuration".

- Add the copied key to /root/.ssh/authorized_keys file on the host

Select "System SSH Key" and proceed with next steps.
Expand Down