Joerg Posted March 20, 2008 Share Posted March 20, 2008 After googling I found out that this question is documented, but even after using the same code I can't get it to work (maybe because I used ssh yesterday for the first time). I want to connect to a virtual Windows XP machine with my ubuntu machine. I installed the openssh-server on ubuntu, forwarded the port 22 on my router and created a dyndns hostname. On the Windows XP machine, I'm using PuTTy. So, Ubuntu is the server, and Windows the client. I want Windows (PuTTy) to connect to Ubuntu (ssh-server) and create a tunnel so I can use this connection to execute some shell commands. So here's what I tried: Executed code - Windows (plink is the command line tool of putty) plink.exe -R -N 2048:localhost:22 username.of.ubuntu@hostname.of.ubuntu I get an connection, enter my username and password of my ubuntu machine. Executed code - Ubuntu ssh -p 2048 username.of.windows@localhost I get an "ssh_exchange_identification: Connection closed by remote host " error ? I added "sshd : ALL" to /etc/hosts.allow, but it doesn't seem to help. Hmm, does anyone has a solution, and, is it actually possible to have a windows shell under linux/ubuntu? Quote Link to comment Share on other sites More sharing options...
SomeoneE1se Posted March 20, 2008 Share Posted March 20, 2008 you're trying to connect from windows into ubtuntu? or from ubuntu into windows? Quote Link to comment Share on other sites More sharing options...
Sparda Posted March 20, 2008 Share Posted March 20, 2008 You mentioned that XP is virtualised in passing. What computer is hosting this VM? Quote Link to comment Share on other sites More sharing options...
Joerg Posted March 20, 2008 Author Share Posted March 20, 2008 @SomeoneE1se: First I connect from Windows to Ubuntu, then from Ubuntu to Windows (as far as I can see) @Sparda: The same machine is hosting Windows. Maybe problems with the port? Quote Link to comment Share on other sites More sharing options...
Sparda Posted March 20, 2008 Share Posted March 20, 2008 In which case you don't need to (and shouldn't) setup port farwarding on the router. This is for creating a connection form the Internet to a local computer. Insted of using plink.exe -R -N 2048:localhost:22 username.of.ubuntu@hostname.of.ubuntu try plink.exe -R -N 2048:localhost:22 username.of.ubuntu@[color=red]IP Address[/color].of.ubuntu . What software are you using to host the VM (VMware, Xen, Virtual Box)? Quote Link to comment Share on other sites More sharing options...
Joerg Posted March 20, 2008 Author Share Posted March 20, 2008 I'm scripting a kind of one-click-vnc-with-nice-little-buttons-and-graphics for relatives, friends and other not very computer interested persons. I want ssh to tunnel the vnc traffic and create a remote shell (like netcat, only via ssh), so I simulate the existence of the internet in my scenario (vm). I tried it but I get the same error. I use virtualbox. Update: Uhm, obvious: if nothing is listening, nothing can be established. Problem solved by installing openssh on the client machine. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.