Hi all,
Trying to run on Ubuntu 17. The ssh to qemu fails with the following error:
sudo ssh -v -i /home/claudiog/.ssh/id_rsa -p 10021 -o "StrictHostKeyChecking no" -o "IdentitiesOnly yes" root@localhost
OpenSSH_7.5p1 Ubuntu-10ubuntu0.1, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to localhost [127.0.0.1] port 10021.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /home/claudiog/.ssh/id_rsa type 1
*debug1: key_load_public: No such file or directory
**debug1: identity file /home/claudiog/.ssh/id_rsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.5p1 Ubuntu-10ubuntu0.1
ssh_exchange_identification: read: Connection reset by peer
I exported the host id_rsa.pub to qemu ~/.ssh/authorization_keys.
I assume I'm missing something regarding to ssh-keygen - **certificates?
Anybody can help?
Thanks.
---------------------------------------------------------------------
Intel Israel (74) Limited
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
I compiled Linux 5.16.10 locally (it had CONFIG_VIRTIO_NET=y CONFIG_E1000=y CONFIG_E1000E=y by default). Here is the command that I'm running: qemu-system-aarch64 -machine virt,mte=on -cpu max -kernel linux-5.16.10/arch/arm64/boot/Image -hda ../../../Downloads/core-image-minimal-dev-qemuarm64.ext4 -m 2G -serial stdio -append "root=/dev/vda" -device e1000,netdev=net0 -netdev user,id=net0,hostfwd=tcp::5555-:22
and then I try to ssh using command "ssh -vvv root@localhost -p5555". Here is the output : [Connection closed by remote host]
On the guest VM, I added my local id_rsa.pub file contents to the VM's /etc/ssh/authorized_keys file. I also manually added a sshd_config file in /etc/ssh folder. I ran 'ps aux | grep ssh' but didn't find anything.
Also ifconfig on the VM only returns "lo" and no ethernet interface.
Lastly, I also tried a slightly different qemu command -
'qemu-system-aarch64 -machine virt,mte=on -cpu max -kernel linux-5.16.10/arch/arm64/boot/Image -hda ../../../Downloads/core-image-minimal-dev-qemuarm64.ext4 -m 2G -serial stdio -append "root=/dev/vda" -chardev socket,path=/tmp/port1,server=on,wait=off,id=port1-char -device virtio-serial -device virtserialport,id=port1,chardev=port1-char,name=org.fedoraproject.port.0 -net user,hostfwd=tcp::5555-:22 -net nic', but SSH again fails with the same error as above.
It'd be great if you could help me figure out the issue here.