CodeGeass
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 192.168.229.103 -l pi
i have also tried this: it starts the debug statements but stops at line 4 when it has to connect to the ip.
Please Help!

klricks
Posts: 6495
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 Raspbian Buster w/ Desktop OS.

User avatar
allfox
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.

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

theoscy
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 - http://www.chiark.greenend.org.uk/~sgta ... 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
DougieLawson
Posts: 35522
Joined: Sun Jun 16, 2013 11:19 pm
Location: 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 [email protected] (assuming you can resolve the hostname pi to an IP addr)
or
ssh [email protected]4 (or whatever your pi has as it's IP addr)
Note: Having anything remotely humorous in your signature is completely banned on this forum. Wear a tinfoil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

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

Re: Need Help with SSH!

Thu Mar 27, 2014 2:44 am

hi
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

theoscy
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”