Skip to content
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

can not add hypervisor, alert "Got error: BAD_SSH_CREDENTIALS" #149

Open
hypozhong opened this issue Feb 18, 2019 · 6 comments
Open

can not add hypervisor, alert "Got error: BAD_SSH_CREDENTIALS" #149

hypozhong opened this issue Feb 18, 2019 · 6 comments
Labels

Comments

@hypozhong
Copy link

hi all,
i deploied two VMs, one of them is Dashboard(192.168.10.107), the other is Hypervisor(192.168.10.108), and the Dashboard and vdi-agent worked normal.

1
and then i try to add hypervior, but it unormal, an it reported error, like this PIC:
2
I checked the log in the /var/log/apache2/error.log, like this PIC,
3
then i try to check the key-free login,command like :ssh -i /var/hyper_keys/id_rsa [email protected]
it logged in sucessfull

4
this is the /var/log/auth.log records.
5

my question is , the dashborad server connect to the hypervisor by Key-free login, this way is OK by command-line, why can not add hypervisor........

@Seitanas
Copy link
Owner

This was asked many times before. Your webserver user cannot read key files. Change permissions.

@Seitanas Seitanas self-assigned this Feb 18, 2019
@Seitanas Seitanas removed their assignment Feb 18, 2019
@hypozhong
Copy link
Author

thank u @Seitanas
I am not very clear about the current allocation of privileges.

  1. what is the dashboard process user,root or VDI
  2. what is the vdi-agent process user?
  3. what the permissions of rhe folder /var/hyper_keys

Please give me a clear idea. thanks a lot

@hypozhong
Copy link
Author

thank u very much, i changed the permissions of the forlder /var/hyper_keys,
chown +r /var/hyper_key
and then add the hypervisor machine successfull

@yeremysantanasuarez
Copy link

I have been trying to solve the problem with ssh2_auth_pubkey_file but it does not solve.
I have tried the forum solutions, but have not yet managed to add the new hypervisor.
Can someone help me, thanks

@robinayinikat
Copy link

I have been trying to solve the same problem with ssh2_auth_pubkey_file but no luck
I have tried the forum solutions, but have not yet managed to add the new hypervisor. my log shows, "PHP Warning: ssh2_auth_pubkey_file(): Authentication failed for VDI using public key: Unable to open public key file in /var/www/html/kvm-vdi/inc/modules/KVM/functions.php on line 18, referer: http://192.168.1.16/kvm-vdi/dashboard.php". need help

@robinayinikat
Copy link

Finally got it working, changed the permissions of the privkey and public key in /var/hyperkeys/ to 644.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants