using Rpi with windows 7 using ssh


11 posts
by munirhasan43 » Tue Apr 02, 2013 11:44 am
Hello,
I have just got a Rpi. I have burned a 2GB SD card with wheezy-raspbian, which i have heard, has ssh enabled by default. I do not have a TV to use as monitor for Rpi so I want to log in to the Rpi using puTTy terminal with ssh from windows 7.

Is it possible to connect to Rpi from windows 7 only using a cross over ethernet cable connected to Rpi and the PC running windows 7 ?
Posts: 7
Joined: Tue Apr 02, 2013 11:34 am
by Davespice » Tue Apr 02, 2013 11:49 am
Yes you can easily do this, a good way is to set Windows 7 to share its network connection. This way Windows will assign an IP address to the Pi and you won't have to worry about setting static IP addresses on either side. It'll also give the Pi the Internet access that your Windows 7 box has.

Info here;
http://windows.microsoft.com/en-gb/wind ... #section_2

And you can probably get away without needing a cross over since the Pi lan port will auto detect and switch accordingly.

And if you want to do Windows file sharing read this;
http://blogs.arcsoftwareconsultancy.com ... etworking/
User avatar
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 1441
Joined: Fri Oct 14, 2011 8:06 pm
Location: London, United Kingdom
by munirhasan43 » Tue Apr 02, 2013 12:39 pm
Hi,
Thanks for a quick reply. I have connected the Rpi with the PC. Windows recognizes it as unidentified network. I have a wireless internet connection that i use with TP-Link usb adapter. I have shared it using the network and sharing center. The unidentified network uses automaitc IP address which obtained IP address 192.168.137.1. But how do i find the IP address of Rpi that i have to put in puTTy ?
Posts: 7
Joined: Tue Apr 02, 2013 11:34 am
by klricks » Tue Apr 02, 2013 12:53 pm
From the RPi enter sudo ifconfig. Look for inet addr: 192.168.x.xxx.
Note: For Ethernet connections look in eth0 section. For WIFI connections look in wlan0 section
Go here for my RPi writeup. Basic config, Serial Port add-on etc:
http://home.budget.net/~klricks/Comp/RPi/Rpi.html
Posts: 1329
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
by Joe Schmoe » Tue Apr 02, 2013 1:03 pm
klricks wrote:From the RPi enter sudo ifconfig. Look for inet addr: 192.168.x.xxx.
Note: For Ethernet connections look in eth0 section. For WIFI connections look in wlan0 section


A little hard to do that if you can't get connected (and don't have a TV/monitor/keyboard/mouse connected)...

Maybe hook up the serial line...
Never answer the question you are asked. Rather, answer the question you wish you had been asked.

- Robert S. McNamara - quoted in "Fog of War" -
Posts: 2621
Joined: Sun Jan 15, 2012 1:11 pm
by munirhasan43 » Tue Apr 02, 2013 1:42 pm
klricks wrote:From the RPi enter sudo ifconfig. Look for inet addr: 192.168.x.xxx.
Note: For Ethernet connections look in eth0 section. For WIFI connections look in wlan0 section


unfortunately i can't get into Rpi as i do not have a TV/monitor. In fact i have never got into Rpi since i got it and the only way for me to get into it is ssh connection.
Posts: 7
Joined: Tue Apr 02, 2013 11:34 am
by Joe Schmoe » Tue Apr 02, 2013 2:06 pm
munirhasan43 wrote:
klricks wrote:From the RPi enter sudo ifconfig. Look for inet addr: 192.168.x.xxx.
Note: For Ethernet connections look in eth0 section. For WIFI connections look in wlan0 section


unfortunately i can't get into Rpi as i do not have a TV/monitor. In fact i have never got into Rpi since i got it and the only way for me to get into it is ssh connection.


Exactly. And the short answer to your query is "Yes, you can do this, but only if you do everything right - and are lucky." It is obviously going to be so much easier if you can beg, borrow, or steal the bits necessary to hook it up "normally" - at least for an hour or two.

The other option is serial. In the good old days, serial was always the one thing guaranteed to work. Nowadays, that's not so much of a given - for a variety of reasons. Still, if you could get the serial thing working, you'd have a way to get in and debug your network setup.
Never answer the question you are asked. Rather, answer the question you wish you had been asked.

- Robert S. McNamara - quoted in "Fog of War" -
Posts: 2621
Joined: Sun Jan 15, 2012 1:11 pm
by azeam » Tue Apr 02, 2013 2:22 pm
Haven't used Windows in a long time, but to find the ip address of locally connected devices, wouldn't it work to just do
Code: Select all
arp -a
User avatar
Posts: 192
Joined: Fri Oct 26, 2012 11:13 pm
by Davespice » Tue Apr 02, 2013 2:26 pm
You can also try guessing it?
192.168.137.2 maybe?

The other option you've got is to get a monitor on it, do sudo apt-get install winbind and then you'll be able to use the node name in putty as opposed to the IP address.

So typing raspberrypi into putty should work then. You might also be able to do this blind, by using a keyboard on the Pi itself.
User avatar
Raspberry Pi Foundation Employee & Forum Moderator
Raspberry Pi Foundation Employee & Forum Moderator
Posts: 1441
Joined: Fri Oct 14, 2011 8:06 pm
Location: London, United Kingdom
by munirhasan43 » Wed Apr 03, 2013 6:23 am
Davespice wrote:You can also try guessing it?
192.168.137.2 maybe?

The other option you've got is to get a monitor on it, do sudo apt-get install winbind and then you'll be able to use the node name in putty as opposed to the IP address.

So typing raspberrypi into putty should work then. You might also be able to do this blind, by using a keyboard on the Pi itself.


Hey ! The weirdest thing happened. I logged into the Rpi using ssh. :) :) I had no UPS and suddenly there was a power cut while the Rpi was connected with PC. After a restart i suddenly noticed in the local area network connection status there was sent and received bytes. Previously there was no received bytes. Then i used Advanced Port scanner and found the IP of the Rpi. Now i can log into the Rpi :D . It seems the restart during the power cut did the trick. Thanks everyone for your help.
Posts: 7
Joined: Tue Apr 02, 2013 11:34 am
by munirhasan43 » Tue Apr 09, 2013 12:17 pm
One other thing. When there is internet connection available i can share it using sharing option which assigns an IP address to Rpi. But what should i do when internet connection is not available ? How the assignment of IP address of host PC and Rpi will be configured ? When I connect Rpi through an LAN cable to host PC, host PC shows undefined public network but no network activity (there are only sent byets no received bytes)
Posts: 7
Joined: Tue Apr 02, 2013 11:34 am