Page 1 of 1

Simple ssh connection from laptop

Posted: Sat Jun 02, 2012 7:13 am
by TelescopeNerd
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.

Re: Simple ssh connection from laptop

Posted: Sat Jun 02, 2012 10:48 am
by bredman
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?

Re: Simple ssh connection from laptop

Posted: Sat Jun 02, 2012 11:45 am
by soslug
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

Re: Simple ssh connection from laptop

Posted: Sat Jun 02, 2012 8:32 pm
by zebo-the-fat
Great!
I log in from my Windoze machine using putty, then use ultravnc. Works well!

Re: Simple ssh connection from laptop

Posted: Sun Nov 11, 2012 10:57 am
by Byteme
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?

Re: Simple ssh connection from laptop

Posted: Sat Nov 17, 2012 6:05 pm
by Byteme
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.