Page 1 of 1

Need Help with SSH!

Posted: Tue Mar 25, 2014 9:46 pm
by CodeGeass
Hey everyone!
I have a wifi dongle set-up on my Raspberry Pi which i set up such that it directly connects to my wifi which i set up through connectify (Its used for generating a wifi hotspot using the internet from the ethernet cable) and i put a static ip. Till now i have been compiling my projects through ssh on windows 7.
I recently got Ubuntu 13.10 set up in my virtualbox so that i can cross compile my programs. i also ensured that it has access to LAN and internet.
My problem starts here.

I am unable to access my raspberry pi through ssh on my Ubuntu platform as the connection keeps timing out.
this is my ssh code on Ubuntu

Code: Select all

ssh -l pi
i have also tried this:

Code: Select all

ssh -vvv pi@
it starts the debug statements but stops at line 4 when it has to connect to the ip.
Please Help!

Re: Need Help with SSH!

Posted: Wed Mar 26, 2014 12:56 am
by klricks
Check your firewall and make sure you have allowed access to SSH port 22. It's not enabled by default.

Re: Need Help with SSH!

Posted: Wed Mar 26, 2014 9:31 am
by allfox
Not sure about this, could you post your Ubuntu's 'ip addr' output?

I know nothing about Connectify, I just guess most of these software share you internet by NAT.
And when I was using VirtualBox, its network adapter was default to NAT mode.

So here you have two NAT network, one is Pi and Win7, the other is Ubuntu and Win7. Both of them using Win7 as the gateway. Problem is, do Win7 able to transfer things between these two networks? I'm not sure about this.

In VirtualBox's options, you could change its network adapter to act in 'bridge mode'. This option will make Ubuntu and Win7 not to form a NAT network, but act just like two computers in a same LAN.
I think this 'bridge mode' worth a try if you could SSH from your Pi to Ubuntu(not the reverse direction).

And maybe you chould check Connectify's option to tell if it has a 'bridge mode' either. If so, try it with VirtualBox.

When Ubuntu, Pi and Win7 in the same LAN, they could talk to each other at any direction. But in NAT, only things inside NAT could start a talk to outside. This form a dead lock situation when you have two NAT networks, because both of these network's inside can not reach the other's inside. You need configure the gateway or just broke this situation by eliminate NAT.

Re: Need Help with SSH!

Posted: Wed Mar 26, 2014 11:30 am
by gregor3000
you will need to reconfigure network in virtualbox or create propper dual boot with ubuntu. it's easy with windows 7.

bridged network makes ubutnu in virtualbox act as server. that server can be accessed from RPi or you can SSH to it from windows 7 as well. ubutnu needs ssh to be installed as well as ports need to be opened to access it.

i am not sure which network setting on virtual mashcine would make it availabel to connect to Rpi. but there is a setting. i mean if you can connect to the rest of internet why not to SSH server (RPi) on LAN?!.

Re: Need Help with SSH!

Posted: Wed Mar 26, 2014 11:21 pm
by theoscy
1. Install wine on Ubuntu, via the marketplace (ugg) or the TERMINAL - 'sudo apt-get install wine'.
2. Download the putty exe - ... nload.html
3. Install putty via wine - When you download the exe change the application to open it with to 'wine installer'. (Lots of tutorials on this.)
4. Use this to ssh into the PI as it is much more flexible than Ubuntu's default settings.

Re: Need Help with SSH!

Posted: Wed Mar 26, 2014 11:27 pm
by DougieLawson
Why are you suggesting that, it's crazy?

Ubuntu has native ssh support, you don't need wine and you don't need to run PuTTY under wine. If it's not available try installing it with
sudo apt-get install openssh-client
but it should be there in most distros as part of the base code packages.

Simply use
ssh pi@pi (assuming you can resolve the hostname pi to an IP addr)
ssh pi@ (or whatever your pi has as it's IP addr)

Re: Need Help with SSH!

Posted: Thu Mar 27, 2014 2:44 am
by diors
how about try to ping the Pi from your computer ,maybe windows(cmd.exe), try to check the connection between Pi and PC via WLAN

then try to ping the Pi in the Virtual Machine ,try to check whether the connection of VM and PC working well

Last ,you can try to ping PC from the Pi.

after that steps ,you would locate the problem.
(Did you enable DHCP in the Router ? Did you installed SSH in Pi?The OS in Pi need SSH as well)

Hope this can help you

Re: Need Help with SSH!

Posted: Thu Mar 27, 2014 5:41 pm
by theoscy
DougieLawson wrote:Why are you suggesting that, it's crazy?
I'm suggesting that because the method which you recommended was not working as was outlined. I offered an alternative solution which could possibly resolve the issue.