# Can't ssh into VMs

**URL:** <https://forum.opennebula.io/t/cant-ssh-into-vms/10236>\
**Category:** Product Support\
**Created:** [January 11, 2022, 2:33pm UTC](https://forum.opennebula.io/t/cant-ssh-into-vms/10236 "2022-01-11T14:33:28Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Samu](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@Samu](https://forum.opennebula.io/u/Samu)\
**Post date:** [January 11, 2022, 2:33pm UTC](https://forum.opennebula.io/t/cant-ssh-into-vms/10236/1 "2022-01-11T14:33:28Z")

</div>

Hello

I’m getting a password request when trying to log into a LXC VM. I can log into it’s host without a password request

> **ssh -vvv 3.68.252.84 (password request, as oneadmin)**
>
> OpenSSH\_7.6p1 Ubuntu-4ubuntu0.5, OpenSSL 1.0.2n 7 Dec 2017  
> debug1: Reading configuration data /var/lib/one/.ssh/config  
> debug1: /var/lib/one/.ssh/config line 9: Applying options for \*  
> debug1: Reading configuration data /etc/ssh/ssh\_config  
> debug1: /etc/ssh/ssh\_config line 20: Applying options for \*  
> debug1: Control socket “/run/one/ssh-socks/ctl-M-f8beb43c5c60489e3ccd08074448e46e784e4c55.sock” does not exist  
> debug2: resolving “3.68.252.84” port 22  
> debug2: ssh\_connect\_direct: needpriv 0  
> debug1: Connecting to 3.68.252.84 [3.68.252.84] port 22.  
> debug1: Connection established.  
> debug1: identity file /var/lib/one/.ssh/id\_rsa type 0  
> debug1: key\_load\_public: No such file or directory  
> debug1: identity file /var/lib/one/.ssh/id\_rsa-cert type -1  
> debug1: key\_load\_public: No such file or directory  
> debug1: identity file /var/lib/one/.ssh/id\_dsa type -1  
> debug1: key\_load\_public: No such file or directory  
> debug1: identity file /var/lib/one/.ssh/id\_dsa-cert type -1  
> debug1: key\_load\_public: No such file or directory  
> debug1: identity file /var/lib/one/.ssh/id\_ecdsa type -1  
> debug1: key\_load\_public: No such file or directory  
> debug1: identity file /var/lib/one/.ssh/id\_ecdsa-cert type -1  
> debug1: key\_load\_public: No such file or directory  
> debug1: identity file /var/lib/one/.ssh/id\_ed25519 type -1  
> debug1: key\_load\_public: No such file or directory  
> debug1: identity file /var/lib/one/.ssh/id\_ed25519-cert type -1  
> debug1: Local version string SSH-2.0-OpenSSH\_7.6p1 Ubuntu-4ubuntu0.5  
> debug1: Remote protocol version 2.0, remote software version OpenSSH\_8.2p1 Ubuntu-4ubuntu0.3  
> debug1: match: OpenSSH\_8.2p1 Ubuntu-4ubuntu0.3 pat OpenSSH\* compat 0x04000000  
> debug2: fd 3 setting O\_NONBLOCK  
> debug1: Authenticating to 3.68.252.84:22 as ‘oneadmin’  
> debug3: hostkeys\_foreach: reading file “/var/lib/one/.ssh/known\_hosts”  
> debug3: record\_hostkey: found key type ECDSA in file /var/lib/one/.ssh/known\_hosts:123  
> debug3: load\_hostkeys: loaded 1 keys from 3.68.252.84  
> debug3: order\_hostkeyalgs: prefer hostkeyalgs: [ecdsa-sha2-nistp256-cert-v01@openssh.com](mailto:ecdsa-sha2-nistp256-cert-v01@openssh.com),ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521  
> debug3: send packet: type 20  
> debug1: SSH2\_MSG\_KEXINIT sent  
> debug3: receive packet: type 20  
> debug1: SSH2\_MSG\_KEXINIT received  
> debug2: local client KEXINIT proposal  
> debug2: KEX algorithms: [curve25519-sha256,curve25519-sha256@libssh.org](mailto:curve25519-sha256,curve25519-sha256@libssh.org),ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c  
> debug2: host key algorithms: [ecdsa-sha2-nistp256-cert-v01@openssh.com](mailto:ecdsa-sha2-nistp256-cert-v01@openssh.com),ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa  
> debug2: ciphers ctos: [chacha20-poly1305@openssh.com](mailto:chacha20-poly1305@openssh.com),aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com  
> debug2: ciphers stoc: [chacha20-poly1305@openssh.com](mailto:chacha20-poly1305@openssh.com),aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com  
> debug2: MACs ctos: [umac-64-etm@openssh.com](mailto:umac-64-etm@openssh.com),umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1  
> debug2: MACs stoc: [umac-64-etm@openssh.com](mailto:umac-64-etm@openssh.com),umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1  
> debug2: compression ctos: [none,zlib@openssh.com](mailto:none,zlib@openssh.com),zlib  
> debug2: compression stoc: [none,zlib@openssh.com](mailto:none,zlib@openssh.com),zlib  
> debug2: languages ctos:  
> debug2: languages stoc:  
> debug2: first\_kex\_follows 0  
> debug2: reserved 0  
> debug2: peer server KEXINIT proposal  
> debug2: KEX algorithms: [curve25519-sha256,curve25519-sha256@libssh.org](mailto:curve25519-sha256,curve25519-sha256@libssh.org),ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256  
> debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519  
> debug2: ciphers ctos: [chacha20-poly1305@openssh.com](mailto:chacha20-poly1305@openssh.com),aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com  
> debug2: ciphers stoc: [chacha20-poly1305@openssh.com](mailto:chacha20-poly1305@openssh.com),aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com  
> debug2: MACs ctos: [umac-64-etm@openssh.com](mailto:umac-64-etm@openssh.com),umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1  
> debug2: MACs stoc: [umac-64-etm@openssh.com](mailto:umac-64-etm@openssh.com),umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1  
> debug2: compression ctos: [none,zlib@openssh.com](mailto:none,zlib@openssh.com)  
> debug2: compression stoc: [none,zlib@openssh.com](mailto:none,zlib@openssh.com)  
> debug2: languages ctos:  
> debug2: languages stoc:  
> debug2: first\_kex\_follows 0  
> debug2: reserved 0  
> debug1: kex: algorithm: curve25519-sha256  
> debug1: kex: host key algorithm: ecdsa-sha2-nistp256  
> debug1: kex: server-\>client cipher: [chacha20-poly1305@openssh.com](mailto:chacha20-poly1305@openssh.com) MAC: compression: none  
> debug1: kex: client-\>server cipher: [chacha20-poly1305@openssh.com](mailto:chacha20-poly1305@openssh.com) MAC: compression: none  
> debug3: send packet: type 30  
> debug1: expecting SSH2\_MSG\_KEX\_ECDH\_REPLY  
> debug3: receive packet: type 31  
> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:6xxM9qNHnaGawVnGfeWCNxCoNoeHTkXPGakBgyUUYjs  
> debug3: hostkeys\_foreach: reading file “/var/lib/one/.ssh/known\_hosts”  
> debug3: record\_hostkey: found key type ECDSA in file /var/lib/one/.ssh/known\_hosts:123  
> debug3: load\_hostkeys: loaded 1 keys from 3.68.252.84  
> debug1: Host ‘3.68.252.84’ is known and matches the ECDSA host key.  
> debug1: Found key in /var/lib/one/.ssh/known\_hosts:123  
> debug3: send packet: type 21  
> debug2: set\_newkeys: mode 1  
> debug1: rekey after 134217728 blocks  
> debug1: SSH2\_MSG\_NEWKEYS sent  
> debug1: expecting SSH2\_MSG\_NEWKEYS  
> debug3: receive packet: type 21  
> debug1: SSH2\_MSG\_NEWKEYS received  
> debug2: set\_newkeys: mode 0  
> debug1: rekey after 134217728 blocks  
> debug2: key: /var/lib/one/.ssh/id\_rsa (0x557cf482e030)  
> debug2: key: /var/lib/one/.ssh/id\_dsa ((nil))  
> debug2: key: /var/lib/one/.ssh/id\_ecdsa ((nil))  
> debug2: key: /var/lib/one/.ssh/id\_ed25519 ((nil))  
> debug3: send packet: type 5  
> debug3: receive packet: type 7  
> debug1: SSH2\_MSG\_EXT\_INFO received  
> debug1: kex\_input\_ext\_info: server-sig-algs=\<[ssh-ed25519,sk-ssh-ed25519@openssh.com](mailto:ssh-ed25519,sk-ssh-ed25519@openssh.com),ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com\>  
> debug3: receive packet: type 6  
> debug2: service\_accept: ssh-userauth  
> debug1: SSH2\_MSG\_SERVICE\_ACCEPT received  
> debug3: send packet: type 50  
> debug3: receive packet: type 51  
> debug1: Authentications that can continue: publickey,password  
> debug3: start over, passed a different list publickey,password  
> debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password  
> debug3: authmethod\_lookup publickey  
> debug3: remaining preferred: keyboard-interactive,password  
> debug3: authmethod\_is\_enabled publickey  
> debug1: Next authentication method: publickey  
> **debug1: Offering public key: RSA SHA256:l5qDtqrxhoUcmKqm+S1GR8AnqYu91WVxg5W1qOUoxn0 /var/lib/one/.ssh/id\_rsa**  
> debug3: send\_pubkey\_test  
> debug3: send packet: type 50  
> debug2: we sent a publickey packet, wait for reply  
> debug3: receive packet: type 51  
> debug1: Authentications that can continue: publickey,password  
> debug1: Trying private key: /var/lib/one/.ssh/id\_dsa  
> debug3: no such identity: /var/lib/one/.ssh/id\_dsa: No such file or directory  
> debug1: Trying private key: /var/lib/one/.ssh/id\_ecdsa  
> debug3: no such identity: /var/lib/one/.ssh/id\_ecdsa: No such file or directory  
> debug1: Trying private key: /var/lib/one/.ssh/id\_ed25519  
> debug3: no such identity: /var/lib/one/.ssh/id\_ed25519: No such file or directory  
> debug2: we did not send a packet, disable method  
> debug3: authmethod\_lookup password  
> debug3: remaining preferred: ,password  
> debug3: authmethod\_is\_enabled password  
> debug1: Next authentication method: password

> **ssh -vvv 54.93.244.53 (succesful without password, as oneadmin)**
>
> OpenSSH\_7.6p1 Ubuntu-4ubuntu0.5, OpenSSL 1.0.2n 7 Dec 2017  
> debug1: Reading configuration data /var/lib/one/.ssh/config  
> debug1: /var/lib/one/.ssh/config line 9: Applying options for \*  
> debug1: Reading configuration data /etc/ssh/ssh\_config  
> debug1: /etc/ssh/ssh\_config line 20: Applying options for \*  
> debug1: Control socket “/run/one/ssh-socks/ctl-M-b17aa95248261cfda171a3925deeda298428dff1.sock” does not exist  
> debug2: resolving “54.93.244.53” port 22  
> debug2: ssh\_connect\_direct: needpriv 0  
> debug1: Connecting to 54.93.244.53 [54.93.244.53] port 22.  
> debug1: Connection established.  
> debug1: identity file /var/lib/one/.ssh/id\_rsa type 0  
> debug1: key\_load\_public: No such file or directory  
> debug1: identity file /var/lib/one/.ssh/id\_rsa-cert type -1  
> debug1: key\_load\_public: No such file or directory  
> debug1: identity file /var/lib/one/.ssh/id\_dsa type -1  
> debug1: key\_load\_public: No such file or directory  
> debug1: identity file /var/lib/one/.ssh/id\_dsa-cert type -1  
> debug1: key\_load\_public: No such file or directory  
> debug1: identity file /var/lib/one/.ssh/id\_ecdsa type -1  
> debug1: key\_load\_public: No such file or directory  
> debug1: identity file /var/lib/one/.ssh/id\_ecdsa-cert type -1  
> debug1: key\_load\_public: No such file or directory  
> debug1: identity file /var/lib/one/.ssh/id\_ed25519 type -1  
> debug1: key\_load\_public: No such file or directory  
> debug1: identity file /var/lib/one/.ssh/id\_ed25519-cert type -1  
> debug1: Local version string SSH-2.0-OpenSSH\_7.6p1 Ubuntu-4ubuntu0.5  
> debug1: Remote protocol version 2.0, remote software version OpenSSH\_8.0  
> debug1: match: OpenSSH\_8.0 pat OpenSSH\* compat 0x04000000  
> debug2: fd 3 setting O\_NONBLOCK  
> debug1: Authenticating to 54.93.244.53:22 as ‘oneadmin’  
> debug3: hostkeys\_foreach: reading file “/var/lib/one/.ssh/known\_hosts”  
> debug3: record\_hostkey: found key type RSA in file /var/lib/one/.ssh/known\_hosts:117  
> debug3: record\_hostkey: found key type ECDSA in file /var/lib/one/.ssh/known\_hosts:119  
> debug3: record\_hostkey: found key type ED25519 in file /var/lib/one/.ssh/known\_hosts:120  
> debug3: load\_hostkeys: loaded 3 keys from 54.93.244.53  
> debug3: order\_hostkeyalgs: prefer hostkeyalgs: [ecdsa-sha2-nistp256-cert-v01@openssh.com](mailto:ecdsa-sha2-nistp256-cert-v01@openssh.com),ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa  
> debug3: send packet: type 20  
> debug1: SSH2\_MSG\_KEXINIT sent  
> debug3: receive packet: type 20  
> debug1: SSH2\_MSG\_KEXINIT received  
> debug2: local client KEXINIT proposal  
> debug2: KEX algorithms: [curve25519-sha256,curve25519-sha256@libssh.org](mailto:curve25519-sha256,curve25519-sha256@libssh.org),ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c  
> debug2: host key algorithms: [ecdsa-sha2-nistp256-cert-v01@openssh.com](mailto:ecdsa-sha2-nistp256-cert-v01@openssh.com),ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa  
> debug2: ciphers ctos: [chacha20-poly1305@openssh.com](mailto:chacha20-poly1305@openssh.com),aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com  
> debug2: ciphers stoc: [chacha20-poly1305@openssh.com](mailto:chacha20-poly1305@openssh.com),aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com  
> debug2: MACs ctos: [umac-64-etm@openssh.com](mailto:umac-64-etm@openssh.com),umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1  
> debug2: MACs stoc: [umac-64-etm@openssh.com](mailto:umac-64-etm@openssh.com),umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1  
> debug2: compression ctos: [none,zlib@openssh.com](mailto:none,zlib@openssh.com),zlib  
> debug2: compression stoc: [none,zlib@openssh.com](mailto:none,zlib@openssh.com),zlib  
> debug2: languages ctos:  
> debug2: languages stoc:  
> debug2: first\_kex\_follows 0  
> debug2: reserved 0  
> debug2: peer server KEXINIT proposal  
> debug2: KEX algorithms: [curve25519-sha256,curve25519-sha256@libssh.org](mailto:curve25519-sha256,curve25519-sha256@libssh.org),ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1  
> debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519  
> debug2: ciphers ctos: [aes256-gcm@openssh.com](mailto:aes256-gcm@openssh.com),chacha20-poly1305@openssh.com,aes256-ctr,aes256-cbc,aes128-gcm@openssh.com,aes128-ctr,aes128-cbc  
> debug2: ciphers stoc: [aes256-gcm@openssh.com](mailto:aes256-gcm@openssh.com),chacha20-poly1305@openssh.com,aes256-ctr,aes256-cbc,aes128-gcm@openssh.com,aes128-ctr,aes128-cbc  
> debug2: MACs ctos: [hmac-sha2-256-etm@openssh.com](mailto:hmac-sha2-256-etm@openssh.com),hmac-sha1-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha1,umac-128@openssh.com,hmac-sha2-512  
> debug2: MACs stoc: [hmac-sha2-256-etm@openssh.com](mailto:hmac-sha2-256-etm@openssh.com),hmac-sha1-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256,hmac-sha1,umac-128@openssh.com,hmac-sha2-512  
> debug2: compression ctos: [none,zlib@openssh.com](mailto:none,zlib@openssh.com)  
> debug2: compression stoc: [none,zlib@openssh.com](mailto:none,zlib@openssh.com)  
> debug2: languages ctos:  
> debug2: languages stoc:  
> debug2: first\_kex\_follows 0  
> debug2: reserved 0  
> debug1: kex: algorithm: curve25519-sha256  
> debug1: kex: host key algorithm: ecdsa-sha2-nistp256  
> debug1: kex: server-\>client cipher: [chacha20-poly1305@openssh.com](mailto:chacha20-poly1305@openssh.com) MAC: compression: none  
> debug1: kex: client-\>server cipher: [chacha20-poly1305@openssh.com](mailto:chacha20-poly1305@openssh.com) MAC: compression: none  
> debug3: send packet: type 30  
> debug1: expecting SSH2\_MSG\_KEX\_ECDH\_REPLY  
> debug3: receive packet: type 31  
> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:rqsKSJGh8Mr/cbZLdN27HNAZu4N6y3mlf/rT1Tas0P0  
> debug3: hostkeys\_foreach: reading file “/var/lib/one/.ssh/known\_hosts”  
> debug3: record\_hostkey: found key type RSA in file /var/lib/one/.ssh/known\_hosts:117  
> debug3: record\_hostkey: found key type ECDSA in file /var/lib/one/.ssh/known\_hosts:119  
> debug3: record\_hostkey: found key type ED25519 in file /var/lib/one/.ssh/known\_hosts:120  
> debug3: load\_hostkeys: loaded 3 keys from 54.93.244.53  
> debug1: Host ‘54.93.244.53’ is known and matches the ECDSA host key.  
> debug1: Found key in /var/lib/one/.ssh/known\_hosts:119  
> debug3: send packet: type 21  
> debug2: set\_newkeys: mode 1  
> debug1: rekey after 134217728 blocks  
> debug1: SSH2\_MSG\_NEWKEYS sent  
> debug1: expecting SSH2\_MSG\_NEWKEYS  
> debug3: receive packet: type 21  
> debug1: SSH2\_MSG\_NEWKEYS received  
> debug2: set\_newkeys: mode 0  
> debug1: rekey after 134217728 blocks  
> debug2: key: /var/lib/one/.ssh/id\_rsa (0x563ddbe93030)  
> debug2: key: /var/lib/one/.ssh/id\_dsa ((nil))  
> debug2: key: /var/lib/one/.ssh/id\_ecdsa ((nil))  
> debug2: key: /var/lib/one/.ssh/id\_ed25519 ((nil))  
> debug3: send packet: type 5  
> debug3: receive packet: type 7  
> debug1: SSH2\_MSG\_EXT\_INFO received  
> debug1: kex\_input\_ext\_info: server-sig-algs=\<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521\>  
> debug3: receive packet: type 6  
> debug2: service\_accept: ssh-userauth  
> debug1: SSH2\_MSG\_SERVICE\_ACCEPT received  
> debug3: send packet: type 50  
> debug3: receive packet: type 51  
> debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic  
> debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic  
> debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password  
> debug3: authmethod\_lookup gssapi-keyex  
> debug3: remaining preferred: gssapi-with-mic,publickey,keyboard-interactive,password  
> debug3: authmethod\_is\_enabled gssapi-keyex  
> debug1: Next authentication method: gssapi-keyex  
> debug1: No valid Key exchange context  
> debug2: we did not send a packet, disable method  
> debug3: authmethod\_lookup gssapi-with-mic  
> debug3: remaining preferred: publickey,keyboard-interactive,password  
> debug3: authmethod\_is\_enabled gssapi-with-mic  
> debug1: Next authentication method: gssapi-with-mic  
> debug1: Unspecified GSS failure. Minor code may provide more information  
> No Kerberos credentials available (default cache: FILE:/tmp/krb5cc\_9869)
> 
> debug1: Unspecified GSS failure. Minor code may provide more information  
> No Kerberos credentials available (default cache: FILE:/tmp/krb5cc\_9869)
> 
> debug2: we did not send a packet, disable method  
> debug3: authmethod\_lookup publickey  
> debug3: remaining preferred: keyboard-interactive,password  
> debug3: authmethod\_is\_enabled publickey  
> debug1: Next authentication method: publickey  
> **debug1: Offering public key: RSA SHA256:l5qDtqrxhoUcmKqm+S1GR8AnqYu91WVxg5W1qOUoxn0 /var/lib/one/.ssh/id\_rsa**  
> debug3: send\_pubkey\_test  
> debug3: send packet: type 50  
> debug2: we sent a publickey packet, wait for reply  
> debug3: receive packet: type 60  
> debug1: Server accepts key: pkalg rsa-sha2-512 blen 279  
> debug2: input\_userauth\_pk\_ok: fp SHA256:l5qDtqrxhoUcmKqm+S1GR8AnqYu91WVxg5W1qOUoxn0  
> debug3: sign\_and\_send\_pubkey: RSA SHA256:l5qDtqrxhoUcmKqm+S1GR8AnqYu91WVxg5W1qOUoxn0  
> debug3: send packet: type 50  
> debug3: receive packet: type 52  
> debug1: Authentication succeeded (publickey).  
> Authenticated to 54.93.244.53 ([54.93.244.53]:22).  
> debug1: channel 0: new [client-session]  
> debug3: ssh\_session2\_open: channel\_new: 0  
> debug2: channel 0: send open  
> debug3: send packet: type 90  
> debug1: Requesting [no-more-sessions@openssh.com](mailto:no-more-sessions@openssh.com)  
> debug3: send packet: type 80  
> debug1: Entering interactive session.  
> debug1: pledge: network  
> debug3: receive packet: type 80  
> debug1: client\_input\_global\_request: rtype [hostkeys-00@openssh.com](mailto:hostkeys-00@openssh.com) want\_reply 0  
> debug3: receive packet: type 4  
> debug1: Remote: /var/lib/one/.ssh/authorized\_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding  
> debug3: receive packet: type 4  
> debug1: Remote: /var/lib/one/.ssh/authorized\_keys:1: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding  
> debug3: receive packet: type 91  
> debug2: channel\_input\_open\_confirmation: channel 0: callback start  
> debug2: fd 3 setting TCP\_NODELAY  
> debug3: ssh\_packet\_set\_tos: set IP\_TOS 0x10  
> debug2: client\_session2\_setup: id 0  
> debug2: channel 0: request pty-req confirm 1  
> debug3: send packet: type 98  
> debug1: Sending environment.  
> debug3: Ignored env LS\_COLORS  
> debug1: Sending env LANG = C.UTF-8  
> debug2: channel 0: request env confirm 0  
> debug3: send packet: type 98  
> debug3: Ignored env SUDO\_GID  
> debug3: Ignored env USERNAME  
> debug3: Ignored env SUDO\_COMMAND  
> debug3: Ignored env USER  
> debug3: Ignored env PWD  
> debug3: Ignored env HOME  
> debug3: Ignored env SUDO\_USER  
> debug3: Ignored env SUDO\_UID  
> debug3: Ignored env MAIL  
> debug3: Ignored env SHELL  
> debug3: Ignored env TERM  
> debug3: Ignored env SHLVL  
> debug3: Ignored env LOGNAME  
> debug3: Ignored env PATH  
> debug3: Ignored env \_  
> debug2: channel 0: request shell confirm 1  
> debug3: send packet: type 98  
> debug2: channel\_input\_open\_confirmation: channel 0: callback done  
> debug2: channel 0: open confirm rwindow 0 rmax 32768  
> debug3: receive packet: type 99  
> debug2: channel\_input\_status\_confirm: type 99 id 0  
> debug2: PTY allocation request accepted on channel 0  
> debug2: channel 0: rcvd adjust 2097152  
> debug3: receive packet: type 99  
> debug2: channel\_input\_status\_confirm: type 99 id 0  
> debug2: shell request accepted on channel 0

You can see in **bold** the same key being accepted by the host but rejected by the VM

---

<div class="post-metadata">

**Author:** ![dclavijo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/dclavijo/32/5265_2.png) [@dclavijo](https://forum.opennebula.io/u/dclavijo)\
**Post date:** [January 11, 2022, 3:58pm UTC](https://forum.opennebula.io/t/cant-ssh-into-vms/10236/2 "2022-01-11T15:58:29Z")

</div>

In the host you can access the container using `lxc-attach one-<vm_id>` inside you can check the contents of `~/.ssh/authorized_keys`. By default the contextualization package sets up the SSH access for the root user of the container, not oneadmin. If you are using the oneadmin user in the frontend shell, then your commands are attempting to log you in as oneadmin inside the container.

---

<div class="post-metadata">

**Author:** ![Samu](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@Samu](https://forum.opennebula.io/u/Samu)\
**Post date:** [January 12, 2022, 5:00pm UTC](https://forum.opennebula.io/t/cant-ssh-into-vms/10236/3 "2022-01-12T17:00:43Z")

</div>

Sorry, ofc there is no oneadmin user in the lxc container 😅

But even if I try to ssh with users ubuntu or root I get a password request

I’ve been able to access the containter with lxc-attach and there isn’t a ssh folder at home

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/opennebula/original/2X/c/c6f16a1eee3ef63666128591951e76a5b8452236.png)

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![dclavijo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/dclavijo/32/5265_2.png) [@dclavijo](https://forum.opennebula.io/u/dclavijo)\
**Post date:** [January 13, 2022, 3:31pm UTC](https://forum.opennebula.io/t/cant-ssh-into-vms/10236/4 "2022-01-13T15:31:36Z")

</div>

Do you have the [contextualization package](https://docs.opennebula.io/6.2/management_and_operations/references/creating_images.html) installed in the container ? If that package exists within the container and the VM Template has a defined contextualization, you should be able to get the context information working inside the container.

---

<div class="post-metadata">

**Author:** ![Samu](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@Samu](https://forum.opennebula.io/u/Samu)\
**Post date:** [January 13, 2022, 4:16pm UTC](https://forum.opennebula.io/t/cant-ssh-into-vms/10236/5 "2022-01-13T16:16:48Z")

</div>

I don’t think it’s a context problem because the start script is executing properly, and the context file is being deployed

Also I was able to ssh to this container (same vm template on another machine) from another front-end.

```auto

CONTEXT = [
  FILES_DS = "$FILE[IMAGE=\"client.py\", IMAGE_UNAME=\"oneadmin\"]",
  NETWORK = "YES",
  SET_HOSTNAME = "$NAME",
  SSH_PUBLIC_KEY = "$USER[SSH_PUBLIC_KEY]",
  START_SCRIPT = "the code here is working" 
]

```

If it’s useful i’m using the container “ubuntu\_focal - LXD” from Linux Containers

---

<div class="post-metadata">

**Author:** ![dclavijo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/dclavijo/32/5265_2.png) [@dclavijo](https://forum.opennebula.io/u/dclavijo)\
**Post date:** [January 14, 2022, 4:54pm UTC](https://forum.opennebula.io/t/cant-ssh-into-vms/10236/6 "2022-01-14T16:54:31Z")

</div>

Could you verify

- The ip address is set on the network interface
- The authorized key file of the root user `/root/.ssh/authorized_keys` of the container is populated

The context section you have should make it possible to ssh to the root user of the container (but none other)

---

<div class="post-metadata">

**Author:** ![Samu](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@Samu](https://forum.opennebula.io/u/Samu)\
**Post date:** [January 17, 2022, 8:54am UTC](https://forum.opennebula.io/t/cant-ssh-into-vms/10236/7 "2022-01-17T08:54:37Z")

</div>

- IP address is set on the network interface, as you can see in the template bellow

I’ve also found that even though I have `SSH_PUBLIC_KEY = "$USER[SSH_PUBLIC_KEY]"` in the template, once it’s running the vm seems to not have been able to pick that key: `SSH_PUBLIC_KEY = ""`

> **template on running vm**
>
> This text will be hidden
> 
> ```auto
> User template
> HOT_RESIZE = [
> CPU_HOT_ADD_ENABLED = "NO",
> MEMORY_HOT_ADD_ENABLED = "NO" ]
> HYPERVISOR = "lxc"
> INPUTS_ORDER = ""
> LXD_SECURITY_PRIVILEGED = "true"
> MEMORY_UNIT_COST = "MB"
> SCHED_MESSAGE = ""
> SCHED_REQUIREMENTS = "HYPERVISOR=\"lx*\""
> Template
> AUTOMATIC_DS_REQUIREMENTS = "(\"CLUSTERS/ID\" @> 0 | \"CLUSTERS/ID\" @> 120 | \"CLUSTERS/ID\" @> 121)"
> AUTOMATIC_NIC_REQUIREMENTS = "(\"CLUSTERS/ID\" @> 0 | \"CLUSTERS/ID\" @> 120 | \"CLUSTERS/ID\" @> 121)"
> AUTOMATIC_REQUIREMENTS = "(CLUSTER_ID = 0 | CLUSTER_ID = 120 | CLUSTER_ID = 121) & !(PUBLIC_CLOUD = YES) & !(PIN_POLICY = PINNED)"
> CONTEXT = [
> DISK_ID = "1",
> ETH0_DNS = "8.8.8.8 8.8.4.4",
> ETH0_EXTERNAL = "",
> ETH0_GATEWAY = "10.0.167.154",
> ETH0_GATEWAY6 = "",
> ETH0_IP = "10.0.167.155",
> ETH0_IP6 = "",
> ETH0_IP6_GATEWAY = "",
> ETH0_IP6_METHOD = "",
> ETH0_IP6_METRIC = "",
> ETH0_IP6_PREFIX_LENGTH = "",
> ETH0_IP6_ULA = "",
> ETH0_MAC = "02:00:0a:00:a7:9b",
> ETH0_MASK = "255.255.255.254",
> ETH0_METHOD = "",
> ETH0_METRIC = "",
> ETH0_MTU = "",
> ETH0_NETWORK = "",
> ETH0_SEARCH_DOMAIN = "",
> ETH0_VLAN_ID = "",
> ETH0_VROUTER_IP = "",
> ETH0_VROUTER_IP6 = "",
> ETH0_VROUTER_MANAGEMENT = "",
> FILES_DS = "/var/lib/one//datastores/2/db6c9110f4fd8c8aefee9657a5f09f0d:'client.py' ",
> NETWORK = "YES",
> SET_HOSTNAME = "from_cli-212",
> SSH_PUBLIC_KEY = "", 
> START_SCRIPT = "sudo apt update
> sudo apt install python3-pip --yes
> pip3 install --upgrade pip
> pip3 install flwr==0.17
> pip3 install keras==2.6.0
> pip3 install tensorflow-cpu==2.6.0
> sudo apt install vnstati --yes
> sudo apt-get install tcpdump -y
> sudo tcpdump -i eth0 port 8080 -s 65535 -w /tmp/wireshark.pcap &
> python3 /context/client.py --position 10 --nodes 10 &> /tmp/output.txt
> sudo pkill -f tcpdump
> sudo chmod 666 /tmp/wireshark.pcap
> vnstati -s -o /tmp/network.png",
> TARGET = "hda" ]
> CPU = "1"
> DISK = [
> ALLOW_ORPHANS = "YES",
> CLONE = "YES",
> CLONE_TARGET = "SYSTEM",
> CLUSTER_ID = "0,120,121",
> DATASTORE = "default",
> DATASTORE_ID = "1",
> DEV_PREFIX = "sd",
> DISK_ID = "0",
> DISK_SNAPSHOT_TOTAL_SIZE = "0",
> DISK_TYPE = "FILE",
> DRIVER = "raw",
> FORMAT = "raw",
> IMAGE = "ubuntu_focal - LXD",
> IMAGE_ID = "2",
> IMAGE_STATE = "2",
> IMAGE_UNAME = "oneadmin",
> LN_TARGET = "SYSTEM",
> ORIGINAL_SIZE = "1024",
> READONLY = "NO",
> SAVE = "NO",
> SIZE = "5000",
> SOURCE = "/var/lib/one//datastores/1/37eff79b661e816ffe5e218194e4ed9a",
> TARGET = "sda",
> TM_MAD = "ssh",
> TYPE = "FILE" ]
> GRAPHICS = [
> LISTEN = "0.0.0.0",
> PORT = "6112",
> TYPE = "VNC" ]
> MEMORY = "1500"
> NIC = [
> AR_ID = "4",
> AWS_ALLOCATION_ID = "eipalloc-0831a6cd201b47344",
> BRIDGE = "br0",
> BRIDGE_TYPE = "linux",
> CLUSTER_ID = "120",
> EXTERNAL_IP = "52.28.167.155",
> GATEWAY = "10.0.167.154",
> IP = "10.0.167.155",
> MAC = "02:00:0a:00:a7:9b",
> NAME = "NIC0",
> NETWORK = "frankfurt-cluster-public",
> NETWORK_ID = "20",
> NETWORK_MODE = "auto",
> NIC_ID = "0",
> SECURITY_GROUPS = "0",
> TARGET = "one-212-0",
> VN_MAD = "elastic" ]
> OS = [
> BOOT = "",
> UUID = "0fa06ca1-50c9-42c2-a333-69a640a3438d" ]
> SECURITY_GROUP_RULE = [
> PROTOCOL = "ALL",
> RULE_TYPE = "OUTBOUND",
> SECURITY_GROUP_ID = "0",
> SECURITY_GROUP_NAME = "default" ]
> SECURITY_GROUP_RULE = [
> PROTOCOL = "ALL",
> RULE_TYPE = "INBOUND",
> SECURITY_GROUP_ID = "0",
> SECURITY_GROUP_NAME = "default" ]
> TEMPLATE_ID = "220"
> TM_MAD_SYSTEM = "ssh"
> VMID = "212"
> 
> ```

- There is no .ssh folder at /root/

![image](https://canada1.discourse-cdn.com/flex031/uploads/opennebula/original/2X/2/20fc009b8fb32fc27b025f5a37f2f7b1e0cbc9b2.png)

---

<div class="post-metadata">

**Author:** ![dclavijo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/dclavijo/32/5265_2.png) [@dclavijo](https://forum.opennebula.io/u/dclavijo)\
**Post date:** [January 17, 2022, 2:58pm UTC](https://forum.opennebula.io/t/cant-ssh-into-vms/10236/8 "2022-01-17T14:58:37Z")

</div>

> I’ve also found that even though I have `SSH_PUBLIC_KEY = "$USER[SSH_PUBLIC_KEY]"` in the template, once it’s running the vm seems to not have been able to pick that key: `SSH_PUBLIC_KEY = ""`

Maybe worth checking the SSH\_PUBLIC\_KEY attribute of the user that owns the VM ?

> - There is no .ssh folder at /root/

If you check if the context daemon inside the container got the information, please check the file `/context/context.sh` inside the container. It should contain a list of the context related variables.

---

<div class="post-metadata">

**Author:** ![Samu](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@Samu](https://forum.opennebula.io/u/Samu)\
**Post date:** [January 18, 2022, 9:48am UTC](https://forum.opennebula.io/t/cant-ssh-into-vms/10236/9 "2022-01-18T09:48:36Z")

</div>

Thanks! It works after setting up that attribute

I think this should be included in the documentation, because I had to follow this older post to add it [[SOLVED] How todo I provide ssh\_public\_key the correct way](https://forum.opennebula.io/t/solved-how-todo-i-provide-ssh-public-key-the-correct-way/1584)

Maybe here? [Advanced SSH Usage — OpenNebula 6.2.0 documentation](https://docs.opennebula.io/6.2/installation_and_configuration/large-scale_deployment/advanced_ssh_usage.html#)

---

<div class="post-metadata">

**Author:** ![dclavijo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/dclavijo/32/5265_2.png) [@dclavijo](https://forum.opennebula.io/u/dclavijo)\
**Post date:** [January 18, 2022, 3:01pm UTC](https://forum.opennebula.io/t/cant-ssh-into-vms/10236/10 "2022-01-18T15:01:43Z")

</div>

It is already included in the [user management section](https://docs.opennebula.io/6.2/management_and_operations/users_groups_management/manage_users.html#user-templates).

> These attributes can be later used in the [Virtual Machine Contextualization](https://docs.opennebula.io/6.2/management_and_operations/references/template.html#template-context). For example, using contextualization the user’s public ssh key can be automatically installed in the VM:

But if you feel like there is a better way, please feel free to [open a new issue](https://github.com/OpenNebula/one/issues/new) with the [documentation label](https://github.com/OpenNebula/one/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22Category%3A+Documentation%22) regarding this.

---

<div class="post-metadata">

**Author:** ![gillranjeett](https://avatars.discourse-cdn.com/v4/letter/g/dbc845/32.png) [@gillranjeett](https://forum.opennebula.io/u/gillranjeett)\
**Post date:** [February 16, 2022, 10:30am UTC](https://forum.opennebula.io/t/cant-ssh-into-vms/10236/11 "2022-02-16T10:30:34Z")

</div>

Thanks! It works after setting up that attribute

---

<div class="post-metadata">

**Author:** ![gillranjeett](https://avatars.discourse-cdn.com/v4/letter/g/dbc845/32.png) [@gillranjeett](https://forum.opennebula.io/u/gillranjeett)\
**Post date:** [February 17, 2022, 2:27pm UTC](https://forum.opennebula.io/t/cant-ssh-into-vms/10236/12 "2022-02-17T14:27:30Z")

</div>

I don’t think it’s a context problem because the start script is executing properly, and the context file is being deployed

[.](https://get-mxplayer.in/mx-player-for-pc-download/)  
[.](https://get-mxplayer.in/mx-player-aio-zip-eac3-codec/)
