2

I am doing everything as I find in tutorials:

  1. Start Gnu/Linux in Virtualbox
  2. In terminal of the Gnu/Linux in Virtualbox type ip a and get:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo 
        valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
        valid_lft forever preferred_lft forever
2: enp0s3: <BRADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether <censored> brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global dynamic noprefixroute enp0s3
        valid_lft 86087sec preferred_lft 86087sec
    inet6 fe80::3550:bab0:c3a:b439/64 scope link noprefixroute
        valid_lft forever preferred_lft forever
  1. Close the Gnu/Linux in Virtualbox
  2. Co to settings of Virtualbox
  3. Set Virutalbox settings for Linux:
    enter image description here
  4. Run Gnu/Linux in Virtualbox
  5. Type in terminal window: ssh 127.0.0.1 -p 2222 -l tester010203044 where tester010203044 is the user-name of the Gnu/Linux in Virtualbox, and get this error message:

    ssh_exchange_identification: read: Connection aborted

I am new to Gnu/Linux. I just want to copy files into Gnu/Linux in Virtualbox from Microsoft's windows.

Running in verbose mode gives:

debug1: Connecting to 127.0.0.1 [127.0.0.1] port 2222.
debug1: Connection established.
debug1: key_load_public: No such file or directory
(...)
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.7
(...)

SSH-2.0-OpenSSH_for_Windows_7.7 Maybe this is the problem? I got Windows 10.

10
  • Windows firewall maybe? Can you bring it down and retry? Feb 8, 2020 at 22:18
  • Switching firewall off didn't help Feb 8, 2020 at 22:22
  • It's normal, but just a test to check where the issue could be. If you don't want to bring down firewall try to switch VM interface from nat to bridge, so you will test with host and guest on same lan. Feb 8, 2020 at 22:26
  • 2
    Can you get a command line inside the VM? Check to see if sshd is actually running and something is actually listening on port 22.
    – Kenster
    Feb 8, 2020 at 23:12
  • 1
    (1) 7.7 is the version of OpenSSH that was ported to Windows (2) on Virtualbox NAT, 'aborted' often occurs when there isn't actually anything listening in the VM (on a real machine this causes connect to fail, but this isn't a real machine) (3) 'Gnu/Linux' is not one thing, there are thousands of variants and the differences matter -- is it one of these or something else? Feb 9, 2020 at 5:11

2 Answers 2

5

Issue is with your virtual box machine. By default ssh came in ubuntu 18.04 but openssh-server will not be there. I tried to re-produce your scenario & got the root cause of issue i.e

ssh_exchange_identification: read: Connection aborted

Solution is as below:

  1. Install openssh-server as root user
    apt install openssh-server
    
  2. Try now
    ssh <username>@192.168.0.103 -p 2222
    

This will work. Let me know if you face any issue.

1
  • Port forwarding is required , host and guest aren't in the same subnet.
    – GAD3R
    Jan 15, 2021 at 8:39
2

Try removing the host IP from the table. Also have you install and enable the sshd daemon, if you haven't done that it won't work. Check if ssh is installed, and the daemon is enabled. This also how I have my IP table setup.

enter image description here

Hopefully this helps

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .