Posts: 1
Joined: Tue Mar 25, 2014 9:26 pm

Need Help with SSH!

Tue Mar 25, 2014 9:46 pm

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!

Posts: 8108
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Need Help with SSH!

Wed Mar 26, 2014 12:56 am

Check your firewall and make sure you have allowed access to SSH port 22. It's not enabled by default.
Unless specified otherwise my response is based on the latest and fully updated RPi OS Bullseye w/ Desktop OS.

User avatar
Posts: 452
Joined: Sat Jun 22, 2013 1:36 pm
Location: Guang Dong, China

Re: Need Help with SSH!

Wed Mar 26, 2014 9:31 am

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.

Posts: 114
Joined: Tue Nov 20, 2012 12:57 pm

Re: Need Help with SSH!

Wed Mar 26, 2014 11:30 am

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?!.

Posts: 44
Joined: Fri Apr 05, 2013 10:42 pm

Re: Need Help with SSH!

Wed Mar 26, 2014 11:21 pm

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.
You could say my love for Linux is terminal ;)

User avatar
Posts: 41884
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Need Help with SSH!

Wed Mar 26, 2014 11:27 pm

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)
Languages using left-hand whitespace for syntax are ridiculous

DMs sent on Twitter/LinkedIn will be answered next month.
Fake doctors - are all on my foes list.

The use of crystal balls and mind reading is prohibited.

Posts: 27
Joined: Fri Mar 21, 2014 5:44 am

Re: Need Help with SSH!

Thu Mar 27, 2014 2:44 am

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

Posts: 44
Joined: Fri Apr 05, 2013 10:42 pm

Re: Need Help with SSH!

Thu Mar 27, 2014 5:41 pm

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.
You could say my love for Linux is terminal ;)

Return to “General discussion”