[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cannot ssh a raspbian guest from the host
From: |
Jeremy Payne |
Subject: |
Re: Cannot ssh a raspbian guest from the host |
Date: |
Mon, 18 Nov 2019 09:43:22 -0600 |
what does iptables look like on your ssh server ?
iptables -L
as a test flush your rules and retry.
iptables -F
On Sun, Nov 17, 2019 at 10:17 AM <address@hidden> wrote:
>
> Hi,
>
>
>
> Using QEMU, I emulate a raspberry on an AWS EC2 ubuntu instance and I am
> unable to ssh the raspberry instance from the ubuntu using the command:
>
> ssh pi@localhost -p 8022
>
>
>
> This is the version of QEMU that I used:
>
> QEMU emulator version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.20)
>
> Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers
>
>
>
> This is the command I used to run the Raspbian instance:
>
> sudo qemu-system-arm -no-reboot -curses -kernel
> /home/ubuntu/qemu_vms/kernel-qemu-4.4.34-jessie -cpu arm1176 -m 256 -M
> versatilepb -serial stdio -append root=/dev/sda2 panic=1 rootfstype=ext4 rw
> console=ttyAMA0 -drive
> format=raw,file=/home/ubuntu/qemu_vms/2017-03-02-raspbian-jessie.img,index=0,media=disk
> -netdev user,id=shield,hostfwd=tcp:127.0.0.1:8022-:22 -net nic
>
>
>
> This is the output of the ssh command: ssh pi@localhost -p 8022 -v
>
> OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n 7 Dec 2017
>
> 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 8022.
>
> debug1: Connection established.
>
> debug1: key_load_public: No such file or directory
>
> debug1: identity file /home/ubuntu/.ssh/id_rsa type -1
>
> debug1: key_load_public: No such file or directory
>
> debug1: identity file /home/ubuntu/.ssh/id_rsa-cert type -1
>
> debug1: key_load_public: No such file or directory
>
> debug1: identity file /home/ubuntu/.ssh/id_dsa type -1
>
> debug1: key_load_public: No such file or directory
>
> debug1: identity file /home/ubuntu/.ssh/id_dsa-cert type -1
>
> debug1: key_load_public: No such file or directory
>
> debug1: identity file /home/ubuntu/.ssh/id_ecdsa type -1
>
> debug1: key_load_public: No such file or directory
>
> debug1: identity file /home/ubuntu/.ssh/id_ecdsa-cert type -1
>
> debug1: key_load_public: No such file or directory
>
> debug1: identity file /home/ubuntu/.ssh/id_ed25519 type -1
>
> debug1: key_load_public: No such file or directory
>
> debug1: identity file /home/ubuntu/.ssh/id_ed25519-cert type -1
>
> debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
>
> ssh_exchange_identification: read: Connection reset by peer
>
>
>
> I already validated that:
>
> The ssh service is running in the Raspbian instance.
> In /etc/sshd_config, PasswordAuthentication is set to yes
> From the Raspbian instance itself, ssh pi@locahost works fine
> Ifconfig returns:
>
> eth0 Link encap:Ethernet HWaddr 52:54:00:12:34:56
>
> inet addr:169.254.62.131 Bcast:169.254.255.255 Mask:255.255.0.0
>
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
>
> RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>
> TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
>
> collisions:0 txqueuelen:1000
>
> RX bytes:0 (0.0 B) TX bytes:12452 (12.1 KiB)
>
> Interrupt:57 Base address:0x8000 DMA chan:ff
>
>
>
> lo Link encap:Local Loopback
>
> inet addr:127.0.0.1 Mask:255.0.0.0
>
> UP LOOPBACK RUNNING MTU:65536 Metric:1
>
> RX packets:279 errors:0 dropped:0 overruns:0 frame:0
>
> TX packets:279 errors:0 dropped:0 overruns:0 carrier:0
>
> collisions:0 txqueuelen:1
>
> RX bytes:25786 (25.1 KiB) TX bytes:25786 (25.1 KiB)
>
>
>
> Can you please help me in this issue?
>
>
>
> Thanks,
>
> Avraham
>
>