TelescopeNerd
Posts: 1
Joined: Sat Jun 02, 2012 7:04 am

Simple ssh connection from laptop

Sat Jun 02, 2012 7:13 am

Playing around with connecting to rpi from my laptop. I found the following useful:

the ssh service does not start by default. to make it do this use the command

Code: Select all

sudo update-rc.d ssh defaults
Now reboot the rpi and the ssh service will start automatically. You can now connect to the rpi if you know its ip address but this is a bit annoying as hostnames are easier to remember and don't change. to enable easy hostname connection install avahi on the rpi

Code: Select all

sudo apt-get install avahi-daemon
Again restart the rpi. Now from your laptop you can connect to the rpi using

Code: Select all

ssh pi@raspberrypi.local
Now you can control the rpi just by connecting a power cable and an ethernet cable and logging on from your networked laptop. Phew.

bredman
Posts: 1415
Joined: Tue Jan 17, 2012 2:38 pm

Re: Simple ssh connection from laptop

Sat Jun 02, 2012 10:48 am

The easy way to enable SSH is shown in the wiki. http://elinux.org/R-Pi_Troubleshooting# ... h_in_to_Pi

I have never seen this solution with avahi before. A lot of people are having problems accessing the RPi by hostname from a Windows PC. Will this fix the problems with access from a Windows PC?

User avatar
soslug
Posts: 39
Joined: Mon May 21, 2012 12:31 pm
Location: Southend on Sea
Contact: Website Yahoo Messenger

Re: Simple ssh connection from laptop

Sat Jun 02, 2012 11:45 am

Suggestion, openssh-server is what most of the linux community uses on Debian and Ubuntu etc.

To install you need do the following

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install openssh-server

once installed on your Raspberry Pi it is ready to use

Using your client computer if on a linux computer you need nothing more than enter on the command line or terminal window the following

ssh IP_Address_of_Pi -l pi

ssh = the command
IP_Address_of_Pi = 192.168.1.7 (use ifconfig to identify your IP address on your Raspberry Pi)
-l = minus el (-L but in lowercase means Loginname)
pi = Username as used by the Raspberry Pi Debian build (alter according to image installed)

eg. ssh 192.168.1.7 -l pi

Enter password

Provided both client and server are on the same network you can use ssh this way
IPFreely, to weed the network demons that dwell in them their Windows!

User avatar
zebo-the-fat
Posts: 22
Joined: Mon Nov 14, 2011 10:40 pm

Re: Simple ssh connection from laptop

Sat Jun 02, 2012 8:32 pm

Great!
I log in from my Windoze machine using putty, then use ultravnc. Works well!
Arguing with an engineer is like wrestling with a pig in mud ..... after a while you realise that the pig likes it!

Byteme
Posts: 5
Joined: Thu Sep 20, 2012 1:52 pm

Re: Simple ssh connection from laptop

Sun Nov 11, 2012 10:57 am

zebo-the-fat wrote:Great!
I log in from my Windoze machine using putty, then use ultravnc. Works well!
Could you tell me how you configured your avahi? I used the standard configuration from http://elinux.org/RPi_Advanced_Setup#Se ... _operation and all putty tells me: Unable to open connection to raspberrypi.local Host does not exist. I suspect it has something to do with the DNS server, I think the configuration doesn't send the hostname to the DNS server... edit: I'm almost sure, because I can ping from the command line(in Winblows) to the IP-adress of my pi, but not to raspberrypi.local. However I CAN ping to raspberry.local and ssh into it from the secure shell of the pi.

Please help me?

Byteme
Posts: 5
Joined: Thu Sep 20, 2012 1:52 pm

Re: Simple ssh connection from laptop

Sat Nov 17, 2012 6:05 pm

Byteme wrote:
zebo-the-fat wrote:Great!
I log in from my Windoze machine using putty, then use ultravnc. Works well!
Could you tell me how you configured your avahi? I used the standard configuration from http://elinux.org/RPi_Advanced_Setup#Se ... _operation and all putty tells me: Unable to open connection to raspberrypi.local Host does not exist. I suspect it has something to do with the DNS server, I think the configuration doesn't send the hostname to the DNS server... edit: I'm almost sure, because I can ping from the command line(in Winblows) to the IP-adress of my pi, but not to raspberrypi.local. However I CAN ping to raspberry.local and ssh into it from the secure shell of the pi.

Please help me?
Figured out how I can address my pi as raspberrypi.local from my windows pc, I added it to the elinux wiki, I hope I didn't break any geek protocol by doing that :ugeek: ... Anyhow: http://www.elinux.org/RPi_Advanced_Setup I added Get Wind/blows to play nice with avahi.

Return to “Beginners”

Who is online

Users browsing this forum: Bing [Bot] and 19 guests