ssh -p xxxx root@localhost / port forwarding doesn't work no more
ssh -p xxxx root@localhost / port forwarding doesn't work no more
Hi,
I'd dozens of VMs running and ssh'ed into them by ssh -p 'portnumer' root@localhost.
It always worked.
Now it stopped working but just for newly created VMs.
I know how to configure port forwarding. It just doesn't work no more for new VMs.
I get:
Christians-MBP:$ ssh -p 6666 root@localhost
ssh: connect to host localhost port 6666: Connection refused
Christians-MBP:$ ssh -p 3334 root@localhost
ssh_exchange_identification: read: Connection reset by peer
Christians-MBP:1$
- sshd is running on the VM
- there's neither something in messages nor in journal
- tcpdump doesn't show anything, even not any RST message.
In my old VMs I can ssh in as I ever could.
Any newly created: SLES, CentOS, Ubuntu.. no way, all behave the same way.
I reinstalled VirtualBox several times.. it remains the same.
Thanks for any help!
Chris
I'd dozens of VMs running and ssh'ed into them by ssh -p 'portnumer' root@localhost.
It always worked.
Now it stopped working but just for newly created VMs.
I know how to configure port forwarding. It just doesn't work no more for new VMs.
I get:
Christians-MBP:$ ssh -p 6666 root@localhost
ssh: connect to host localhost port 6666: Connection refused
Christians-MBP:$ ssh -p 3334 root@localhost
ssh_exchange_identification: read: Connection reset by peer
Christians-MBP:1$
- sshd is running on the VM
- there's neither something in messages nor in journal
- tcpdump doesn't show anything, even not any RST message.
In my old VMs I can ssh in as I ever could.
Any newly created: SLES, CentOS, Ubuntu.. no way, all behave the same way.
I reinstalled VirtualBox several times.. it remains the same.
Thanks for any help!
Chris
-
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: ssh -p xxxx root@localhost / port forwarding doesn't work no more
In the VirtualBox Manager, right-click on a VM that's "not working", Show in Finder. ZIP that ".vbox" file.ChrisLi wrote:Now it stopped working but just for newly created VMs.
Do the same thing for a "working" VM. Attach both ZIP files to your response.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Port Forwarding just stopped working
Hi,
I used VBox since many years on my MacBook Pro with tons of Linux-VMs.
I always log in via ssh -p 'myport' user@localhost to get the console and it just worked until a couple of weeks ago.
On my old VMs it still works but on my newly created it just doesn't work. I get a "connection closed by peer" or similar messages that make no sense.
I un-/reinstalled VBox completely and after reinstalling it makes no difference: port forwarding on my old VMs work but not on new ones.
I'm running the latest version, updated today..
Thanks for any hint!! I'm an IT-Trainer and I check out a lot of things on my VMs.. and this is worst case for me.
Best regards,
Chris
I used VBox since many years on my MacBook Pro with tons of Linux-VMs.
I always log in via ssh -p 'myport' user@localhost to get the console and it just worked until a couple of weeks ago.
On my old VMs it still works but on my newly created it just doesn't work. I get a "connection closed by peer" or similar messages that make no sense.
I un-/reinstalled VBox completely and after reinstalling it makes no difference: port forwarding on my old VMs work but not on new ones.
I'm running the latest version, updated today..
Thanks for any hint!! I'm an IT-Trainer and I check out a lot of things on my VMs.. and this is worst case for me.
Best regards,
Chris
-
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: ssh -p xxxx root@localhost / port forwarding doesn't work no more
I merged your new topic with the one from 2 months ago. Next time I'll simply remove your duplicate. Duplicate posts are not allowed. It's not good etiquette...
BTW, you have yet to reply to your first one...
BTW, you have yet to reply to your first one...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Re: ssh -p xxxx root@localhost / port forwarding doesn't work no more
Hi Socratis,
sorry for the duplicate, I just didn't find my first poste and wasn't sure if I posted one anymore.
Thanks so much for looking into it, attached are the 2 zipped .vbox files.
Best,
Chris
sorry for the duplicate, I just didn't find my first poste and wasn't sure if I posted one anymore.
Thanks so much for looking into it, attached are the 2 zipped .vbox files.
Best,
Chris
- Attachments
-
- NotWorkingVM.zip
- (1.49 KiB) Downloaded 207 times
-
- workingVM.zip
- (1.64 KiB) Downloaded 211 times
-
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: ssh -p xxxx root@localhost / port forwarding doesn't work no more
How exactly were you configuring port forwarding? Because there is a key difference in your working CentOS 7.1 VM:ChrisLi wrote:I know how to configure port forwarding. It just doesn't work no more for new VMs.
You need to configure your new VMs the same as the old; change their settings in the networking section. BTW, it's not all ports that you were forwarding, it was port 2222 only...<Forwarding name="Rule 1" proto="1" hostip="127.0.0.1" hostport="2222" guestip="10.0.2.15" guestport="22"/>
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Re: ssh -p xxxx root@localhost / port forwarding doesn't work no more
I go to settings -> network -> advanced settings -> port forwarding -> and used ports 3333, 4444, 5555 and 6666.
That's the only difference in the settings to get on the different boxes simultaneously.
What do you mean by key difference?
Thanks!
Chris
That's the only difference in the settings to get on the different boxes simultaneously.
What do you mean by key difference?
Thanks!
Chris
Re: ssh -p xxxx root@localhost / port forwarding doesn't work no more
End of ideas?
- Chris
- Chris
Re: ssh -p xxxx root@localhost / port forwarding doesn't work no more
I tried it with setting up a VM under a new user account on my laptop but it's the same, no more portforwarding.
- chris
- chris
-
- Site Moderator
- Posts: 27329
- Joined: 22. Oct 2010, 11:03
- Primary OS: Mac OS X other
- VBox Version: PUEL
- Guest OSses: Win(*>98), Linux*, OSX>10.5
- Location: Greece
Re: ssh -p xxxx root@localhost / port forwarding doesn't work no more
You have to explicitly enable port forwarding. Like you did in your old machines (the "key difference").
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Re: ssh -p xxxx root@localhost / port forwarding doesn't work no more
What more can I do than clicking on Port Forwarding and entering the needed info?
- Chris
- Chris
- Attachments
-
- Screen Shot 2018-03-15 at 21.39.49.png (24.52 KiB) Viewed 18293 times
-
- Screen Shot 2018-03-15 at 21.39.16.png (86.13 KiB) Viewed 18293 times
Re: ssh -p xxxx root@localhost / port forwarding doesn't work no more
In the two .vbox files you see exactly the same line which prove that port forwarding is enabled on both:
working VM:
<NAT>
<Forwarding name="Rule 1" proto="1" hostip="127.0.0.1" hostport="2222" guestip="10.0.2.15" guestport="22"/>
</NAT>
not working VM:
<NAT>
<Forwarding name="Rule 1" proto="1" hostip="127.0.0.1" hostport="6666" guestip="10.0.2.15" guestport="22"/>
</NAT>
Hence there's no key difference but as I said just the port.
I tried even the same port 2222 in the not working VM (while the working one was down..) but it doesn't work ether.
- Chris
working VM:
<NAT>
<Forwarding name="Rule 1" proto="1" hostip="127.0.0.1" hostport="2222" guestip="10.0.2.15" guestport="22"/>
</NAT>
not working VM:
<NAT>
<Forwarding name="Rule 1" proto="1" hostip="127.0.0.1" hostport="6666" guestip="10.0.2.15" guestport="22"/>
</NAT>
Hence there's no key difference but as I said just the port.
I tried even the same port 2222 in the not working VM (while the working one was down..) but it doesn't work ether.
- Chris
Re: ssh -p xxxx root@localhost / port forwarding doesn't work no more
Socratis,
did you see that both machines are configured the same?
- Chris
did you see that both machines are configured the same?
- Chris
Re: ssh -p xxxx root@localhost / port forwarding doesn't work no more
After several months suffering this problem it just works again; I just set up a new CentOS7 VM with btrfs..
.. configured the port forwarding as ever..
.. and it works again..
No reason detected; just a bug.
Bad Support here, proposing unlogical hints; or he had no time to look into it..
c
.. configured the port forwarding as ever..
.. and it works again..
No reason detected; just a bug.
Bad Support here, proposing unlogical hints; or he had no time to look into it..
c