Page 1 of 1
how to ssh my virtualbox linux FROM a linux server ?
Posted: 5. Sep 2008, 17:29
by graziano68
Hello
I installed opensuse 11 on my windows xp using virtualbox. It works well/acceptable.
I have only a problem . I can't find a way to ssh FROM my
remote linux server CENTOS 4 TO my opensuse 11 (running via virtual box on Windows)
if my internet ip on linux vitualbox is 151.122.123.123 when I execute
ssh 151.122.123.123
..from my remote centos 4 linux server) I receive this..
ssh: connect to host 151.122.123.123 port 22: Connection refused
I think that ssh running on virtualbox is not visible at all .
Any idea to make it visible please ?
p.s. I think I am receiving this
ssh: connect to host 151.122.123.123 port 22: Connection refused
becuase on windows I have no openssh . Howeve with virtualbox running I have openssh running and I would connect with it from remote linux server. Is it possible ?
Posted: 5. Sep 2008, 19:24
by Sasquatch
How did you set your VM network settings? If you use NAT, see the manual for Port Forwarding. If you use Host Interface Networking with a Bridge, use the actual IP of the VM.
Posted: 5. Sep 2008, 19:25
by TerryE
Since use port redirection. Read the relevant section on the User Guide on NAT or google NAT guestport hostport site:forums.virtualbox.org. You redirect host:2222 to guest:22 and then ssh to host:2222.
You can also download and use PuTTY on windows as an ssh client. It's a good package. I use it all the time.
Posted: 6. Sep 2008, 09:14
by graziano68
it seems failry complicated , however I will try and update here , thank you for now
BTW currently I am using NAT . I have a router , atlantis land , and using port forwarding I allowed port SSH 22 .
Regarding PuTTY on windows as an ssh client , it will not be enough because I need also rsync on windows . However I did some try some time ago (back from linux to windows) and it was not never good because I was always losing permissions , owners and gropus . So I am trying with VM .
Posted: 6. Sep 2008, 09:31
by graziano68
I did a search on this forum as you suggested.
I understood that to use SSH on port 2222 (instead of default 22) I need to do this.
Code: Select all
VBoxManage setextradata open "VBoxInternal/Devices/pcnet/LUN#0/Config/sshguest/Protocol" TCP
VBoxManage setextradata open "VBoxInternal/Devices/pcnet/0/LUN#0/Config/sshguest/GuestPort" 22
VBoxManage setextradata open "VBoxInternal/Devices/pcnet/0/LUN#0/Config/sshguest/HostPort" 2222
I'm trying ( I understood the command above should be entered
on terminal as root right ?)
Posted: 6. Sep 2008, 12:13
by graziano68
I'm really lost where should I enter above commands ?
I always read (on forum and help section) that I should enter it , ok but exactly where and how please ?
Thank you
Posted: 6. Sep 2008, 12:26
by graziano68
ok I found
I open a windows dos window, then
Code: Select all
cd C:\Programmi\Sun\xVM VirtualBox
then
Code: Select all
VBoxManage setextradata open "VBoxInternal/Devices/pcnet/LUN#0/Config/sshguest/Protocol" TCP
VBoxManage setextradata open "VBoxInternal/Devices/pcnet/0/LUN#0/Config/sshguest/GuestPort" 22
VBoxManage setextradata open "VBoxInternal/Devices/pcnet/0/LUN#0/Config/sshguest/HostPort" 2222
where open is my virtual machine. I did it with the virtual machine open was running...
I restarted openSuse.
Then I tried
it does not work/connect ...
Any help please ?
Posted: 6. Sep 2008, 12:55
by graziano68
I succeded
I disabled opensuse firewall and I was able to connect from
remote linux to my virtual linux
Posted: 6. Sep 2008, 15:16
by TerryE
I am glad that you sorted it out. I apologise for not getting back to you but I decided to have an early night (I am on GMT).
PuTTY is fine for a terminal session and for pscp. I don't really need rsync between my Windows environments and my VMs.
Posted: 6. Sep 2008, 19:05
by graziano68
no problem , Thank you !