You are not logged in.

#1 2013-02-08 05:25:33

AlexRu
Member
Registered: 2012-09-18
Posts: 33

[SOLVED] ssh connection to vm refused

Host os - archlinux, guest - minix3(virtualbox). I set up sshd on minix, and added rule for port forwarding in virtbox:
VBoxManage modifyvm "minix3" --natpf1 "guestssh,tcp,,22,,22"
but no luck(
[alex@localhost ~]$ ssh -p 22 alex@localhost -v
OpenSSH_6.1p1, OpenSSL 1.0.1c 10 May 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to localhost [::1] port 22.
debug1: connect to address ::1 port 22: Connection refused
debug1: Connecting to localhost [127.0.0.1] port 22.
debug1: connect to address 127.0.0.1 port 22: Connection refused
ssh: connect to host localhost port 22: Connection refused

When host os windows7 all is working good, what did I miss?
http://wiki.minix3.org/en/DevelopersGui … seTutorial

Last edited by AlexRu (2013-02-08 12:31:06)

Offline

#2 2013-02-08 08:40:55

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,141

Re: [SOLVED] ssh connection to vm refused

it might be a permission problem. Only root can use privileged ports (ports < some value I have forget). I would try to forward the host 2222 to the 22 port of the virtualmachine and see if you can ssh -p 2222 localhost.

Offline

#3 2013-02-08 12:31:30

AlexRu
Member
Registered: 2012-09-18
Posts: 33

Re: [SOLVED] ssh connection to vm refused

thank you, 2222 working good

Offline

#4 2013-02-08 12:36:56

AlexRu
Member
Registered: 2012-09-18
Posts: 33

Re: [SOLVED] ssh connection to vm refused

how can i make it work with 22? i dont have firewall

Offline

#5 2013-02-08 13:40:53

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,141

Re: [SOLVED] ssh connection to vm refused

AlexRu wrote:

how can i make it work with 22? i dont have firewall

It is not a question of firewall, it's a question that non root processes cannot listen to privilegied ports and so Virtualbox can't listen on port 22. Running Virtualbox as root should work but it's a bad idea. I don't know if Virtualbox have foreseen that case and make a suid wrapper around it (do search yourself). You can always use some tricks yourself. Make Virtualbox listen on port 2222 and use something like "netcat -l -p 22 127.0.0.1 2222"  as root (untested).

Last edited by olive (2013-02-08 13:49:20)

Offline

Board footer

Powered by FluxBB