[GH-ISSUE #156] Cannot recv data: Warning #124

Closed
opened 2026-02-27 16:38:03 +03:00 by kerem · 19 comments
Owner

Originally created by @konus4w on GitHub (Dec 6, 2013).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/156

Hi,
When I try to check Overview settings i get a message "Cannot recv data: Warning: Permanently added '10.0.0.2' (RSA) to the list of known hosts. Permission denied, please try again. Permission denied, please try again. Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).: Connection reset by peer"

System: CentOs 6.5 Server
I use SSH connection with root login. Connection is connected.

Thanks for the help.

Originally created by @konus4w on GitHub (Dec 6, 2013). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/156 Hi, When I try to check Overview settings i get a message "Cannot recv data: Warning: Permanently added '10.0.0.2' (RSA) to the list of known hosts. Permission denied, please try again. Permission denied, please try again. Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).: Connection reset by peer" System: CentOs 6.5 Server I use SSH connection with root login. Connection is connected. Thanks for the help.
kerem closed this issue 2026-02-27 16:38:03 +03:00
Author
Owner

@retspen commented on GitHub (Dec 6, 2013):

Hello,

https://github.com/retspen/webvirtmgr/wiki/Setup-SSH-Authorization - read this ?

<!-- gh-comment-id:29997322 --> @retspen commented on GitHub (Dec 6, 2013): Hello, https://github.com/retspen/webvirtmgr/wiki/Setup-SSH-Authorization - read this ?
Author
Owner

@konus4w commented on GitHub (Dec 6, 2013):

Yes, and done everything.

<!-- gh-comment-id:30002144 --> @konus4w commented on GitHub (Dec 6, 2013): Yes, and done everything.
Author
Owner

@retspen commented on GitHub (Dec 7, 2013):

Need test test connections:

$ sudo -u apache ssh server_ip "echo 1234"

Connected with authorization_keys or need input password?

<!-- gh-comment-id:30055098 --> @retspen commented on GitHub (Dec 7, 2013): Need test test connections: $ sudo -u apache ssh server_ip "echo 1234" Connected with authorization_keys or need input password?
Author
Owner

@konus4w commented on GitHub (Dec 7, 2013):

[root@glass ~]# sudo -u apache ssh 10.0.0.2 "echo 1234"
Warning: Permanently added '10.0.0.2' (RSA) to the list of known hosts.
apache@10.0.0.2's password:
Permission denied, please try again.
apache@10.0.0.2's password:

When i set password for apache user:

[root@glass ~]# sudo -u apache ssh 10.0.0.2 "echo 1234"
Warning: Permanently added '10.0.0.245' (RSA) to the list of known hosts.
apache@10.0.0.2's password:
This account is currently not available.

[root@glass ~]# sudo -u root ssh 10.0.0.2 "echo 1234"
root@10.0.0.2's password:
1234
[root@glass ~]#

Connected with input password.

<!-- gh-comment-id:30062582 --> @konus4w commented on GitHub (Dec 7, 2013): [root@glass ~]# sudo -u apache ssh 10.0.0.2 "echo 1234" Warning: Permanently added '10.0.0.2' (RSA) to the list of known hosts. apache@10.0.0.2's password: Permission denied, please try again. apache@10.0.0.2's password: When i set password for apache user: [root@glass ~]# sudo -u apache ssh 10.0.0.2 "echo 1234" Warning: Permanently added '10.0.0.245' (RSA) to the list of known hosts. apache@10.0.0.2's password: This account is currently not available. [root@glass ~]# sudo -u root ssh 10.0.0.2 "echo 1234" root@10.0.0.2's password: 1234 [root@glass ~]# Connected with input password.
Author
Owner

@retspen commented on GitHub (Dec 7, 2013):

Sorry, this my mistake. Need add user who who have authorized_keys for managing libvird

$ sudo -u apache ssh your_user_for_libvirt@server_ip "echo 1234"

<!-- gh-comment-id:30063000 --> @retspen commented on GitHub (Dec 7, 2013): Sorry, this my mistake. Need add user who who have authorized_keys for managing libvird $ sudo -u apache ssh your_user_for_libvirt@server_ip "echo 1234"
Author
Owner

@konus4w commented on GitHub (Dec 7, 2013):

I have used root login.

[root@glass ~]# sudo -u root ssh 10.0.0.2 "echo 1234"
root@10.0.0.2's password:
1234
[root@glass ~]#

<!-- gh-comment-id:30063269 --> @konus4w commented on GitHub (Dec 7, 2013): I have used root login. [root@glass ~]# sudo -u root ssh 10.0.0.2 "echo 1234" root@10.0.0.2's password: 1234 [root@glass ~]#
Author
Owner

@retspen commented on GitHub (Dec 7, 2013):

When you connected via ssh this do user "apache" in CentOS home directory for this user /var/www - need put ssh private key. On host server you use "root" user need put authorization_keys to /root/.ssh Test this settings on server where installed panel WebVirtMgr:

$ sudo -u apache root@10.0.0.2 "echo 1234"

Should login without password

<!-- gh-comment-id:30063723 --> @retspen commented on GitHub (Dec 7, 2013): When you connected via ssh this do user "apache" in CentOS home directory for this user /var/www - need put ssh private key. On host server you use "root" user need put authorization_keys to /root/.ssh Test this settings on server where installed panel WebVirtMgr: $ sudo -u apache root@10.0.0.2 "echo 1234" Should login without password
Author
Owner

@konus4w commented on GitHub (Dec 7, 2013):

[root@glass ~]# sudo -u apache ssh root@10.0.0.245 "echo 1234"
Warning: Permanently added '10.0.0.245' (RSA) to the list of known hosts.
root@10.0.0.245's password:
1234
[root@glass ~]#

I can't login without password as apache user.

<!-- gh-comment-id:30063942 --> @konus4w commented on GitHub (Dec 7, 2013): [root@glass ~]# sudo -u apache ssh root@10.0.0.245 "echo 1234" Warning: Permanently added '10.0.0.245' (RSA) to the list of known hosts. root@10.0.0.245's password: 1234 [root@glass ~]# I can't login without password as apache user.
Author
Owner

@retspen commented on GitHub (Dec 7, 2013):

Check public and privat keys permissions

<!-- gh-comment-id:30064250 --> @retspen commented on GitHub (Dec 7, 2013): Check public and privat keys permissions
Author
Owner

@konus4w commented on GitHub (Dec 7, 2013):

/var/www/.ssh/
-rw------- 1 apache apache 1675 12-06 14:47 id_rsa
-rw-r--r-- 1 apache apache 399 12-06 14:47 id_rsa.pub

/var/www/
drwx------ 2 apache apache 4096 12-06 13:05 .ssh

<!-- gh-comment-id:30064408 --> @konus4w commented on GitHub (Dec 7, 2013): /var/www/.ssh/ -rw------- 1 apache apache 1675 12-06 14:47 id_rsa -rw-r--r-- 1 apache apache 399 12-06 14:47 id_rsa.pub /var/www/ drwx------ 2 apache apache 4096 12-06 13:05 .ssh
Author
Owner

@retspen commented on GitHub (Dec 7, 2013):

Show permissions authorized_keys

<!-- gh-comment-id:30066186 --> @retspen commented on GitHub (Dec 7, 2013): Show permissions authorized_keys
Author
Owner

@konus4w commented on GitHub (Dec 7, 2013):

I made new authorized_keys
cat id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

cat id_rsa.pub >> /var/www/.ssh/authorized_keys
chmod 600 /var/www/.ssh/authorized_keys

-rw------- 1 root root 399 12-07 23:19 authorized_keys

And the error changed to: Cannot recv data: Warning: Permanently added '10.0.0.2' (RSA) to the list of known hosts. Permission denied (publickey,gssapi-keyex,gssapi-with-mic).: Connection reset by peer

<!-- gh-comment-id:30066901 --> @konus4w commented on GitHub (Dec 7, 2013): I made new authorized_keys cat id_rsa.pub >> ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keys cat id_rsa.pub >> /var/www/.ssh/authorized_keys chmod 600 /var/www/.ssh/authorized_keys -rw------- 1 root root 399 12-07 23:19 authorized_keys And the error changed to: Cannot recv data: Warning: Permanently added '10.0.0.2' (RSA) to the list of known hosts. Permission denied (publickey,gssapi-keyex,gssapi-with-mic).: Connection reset by peer
Author
Owner

@konus4w commented on GitHub (Dec 7, 2013):

I changed user permissions to apache:
chown apache. /var/www/.ssh/authorized_keys

In /var/www/.ssh/
drwx------ 2 apache apache 4096 12-07 23:19 .
drwxr-xr-x 8 root root 4096 12-06 11:41 ..
-rw------- 1 apache apache 399 12-07 23:19 authorized_keys
-rw------- 1 apache apache 54 12-06 13:02 config
-rw------- 1 apache apache 1675 12-06 14:47 id_rsa
-rw-r--r-- 1 apache apache 399 12-06 14:47 id_rsa.pub

And the error back to: Cannot recv data: Warning: Permanently added '10.0.0.2' (RSA) to the list of known hosts. Permission denied, please try again. Permission denied, please try again. Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).: Connection reset by peer

<!-- gh-comment-id:30067122 --> @konus4w commented on GitHub (Dec 7, 2013): I changed user permissions to apache: chown apache. /var/www/.ssh/authorized_keys In /var/www/.ssh/ drwx------ 2 apache apache 4096 12-07 23:19 . drwxr-xr-x 8 root root 4096 12-06 11:41 .. -rw------- 1 apache apache 399 12-07 23:19 authorized_keys -rw------- 1 apache apache 54 12-06 13:02 config -rw------- 1 apache apache 1675 12-06 14:47 id_rsa -rw-r--r-- 1 apache apache 399 12-06 14:47 id_rsa.pub And the error back to: Cannot recv data: Warning: Permanently added '10.0.0.2' (RSA) to the list of known hosts. Permission denied, please try again. Permission denied, please try again. Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).: Connection reset by peer
Author
Owner

@retspen commented on GitHub (Dec 8, 2013):

Need put authorized_keys to /root/.ssh/ - change owner and permissions

<!-- gh-comment-id:30077531 --> @retspen commented on GitHub (Dec 8, 2013): Need put authorized_keys to /root/.ssh/ - change owner and permissions
Author
Owner

@konus4w commented on GitHub (Dec 8, 2013):

Ok.
I have authorized_keys only in /root/.ssh/

drwx------ 2 root root 4096 12-07 23:12 .
dr-xr-x---. 7 root root 4096 12-07 22:19 ..
-rw------- 1 root root 399 12-07 23:12 authorized_keys
-rw------- 1 root root 1675 12-06 11:59 id_rsa
-rw-r--r-- 1 root root 399 12-06 11:59 id_rsa.pub
-rw-r--r-- 1 root root 1566 12-07 20:52 known_hosts

And I have the same error message.

When I go to infrastructure page I have error:
Oops!
500 Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete you request.

<!-- gh-comment-id:30078714 --> @konus4w commented on GitHub (Dec 8, 2013): Ok. I have authorized_keys only in /root/.ssh/ drwx------ 2 root root 4096 12-07 23:12 . dr-xr-x---. 7 root root 4096 12-07 22:19 .. -rw------- 1 root root 399 12-07 23:12 authorized_keys -rw------- 1 root root 1675 12-06 11:59 id_rsa -rw-r--r-- 1 root root 399 12-06 11:59 id_rsa.pub -rw-r--r-- 1 root root 1566 12-07 20:52 known_hosts And I have the same error message. When I go to infrastructure page I have error: Oops! 500 Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete you request.
Author
Owner

@konus4w commented on GitHub (Dec 8, 2013):

Also I have autohorized_keys in /home/webvirtmgr/

-rw------- 1 webvirtmgr webvirtmgr 399 12-06 13:08 authorized_keys

<!-- gh-comment-id:30079088 --> @konus4w commented on GitHub (Dec 8, 2013): Also I have autohorized_keys in /home/webvirtmgr/ -rw------- 1 webvirtmgr webvirtmgr 399 12-06 13:08 authorized_keys
Author
Owner

@retspen commented on GitHub (Dec 10, 2013):

  1. Change in file /etc/passwd shell user apache:
    /sbin/nologin to /bin/bash
  2. $ sudo su - apache
  3. $ ssh root@10.0.0.2

If you connected with password something wrong with your authorized_keys and public keys

<!-- gh-comment-id:30221823 --> @retspen commented on GitHub (Dec 10, 2013): 1. Change in file /etc/passwd shell user apache: /sbin/nologin to /bin/bash 2. $ sudo su - apache 3. $ ssh root@10.0.0.2 If you connected with password something wrong with your authorized_keys and public keys
Author
Owner

@konus4w commented on GitHub (Dec 10, 2013):

[root@vms /]# sudo su - apache
-bash-4.1$ ssh root@10.0.0.2
Warning: Permanently added '10.0.0.2' (RSA) to the list of known hosts.
root@10.0.0.2's password:
Last login: Tue Dec 10 13:37:42 2013 from 10.0.0.1
[root@vms ~]#

Unfortunately, the problem has not been solved.

<!-- gh-comment-id:30223361 --> @konus4w commented on GitHub (Dec 10, 2013): [root@vms /]# sudo su - apache -bash-4.1$ ssh root@10.0.0.2 Warning: Permanently added '10.0.0.2' (RSA) to the list of known hosts. root@10.0.0.2's password: Last login: Tue Dec 10 13:37:42 2013 from 10.0.0.1 [root@vms ~]# Unfortunately, the problem has not been solved.
Author
Owner

@retspen commented on GitHub (Dec 10, 2013):

https://www.digitalocean.com/community/articles/how-to-set-up-ssh-keys--2

Read up to "Disable the Password for Root Login"

<!-- gh-comment-id:30223732 --> @retspen commented on GitHub (Dec 10, 2013): https://www.digitalocean.com/community/articles/how-to-set-up-ssh-keys--2 Read up to "Disable the Password for Root Login"
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/webvirtmgr#124
No description provided.