Difference between revisions of "Enable SSH"

From SingletonMillerWiki
Jump to: navigation, search
Line 35: Line 35:
 
   
 
   
 
Enter the password and, you're in!
 
Enter the password and, you're in!
 +
 +
=== Forwarding the X terminal ===
 +
you may need to check that the following line is in your <code>/etc/ssh2/sshd2_config</code> file:
 +
<pre>AllowX11Forwarding              yes</pre>
 +
 +
then simply start the ssh session with the <code>-X</code> option.
 +
<pre>
 +
ssh –X user@192.168.0.20 &
 +
</pre>
  
 
=== Trouble shooting SSH ===
 
=== Trouble shooting SSH ===

Revision as of 04:03, 1 July 2012

In the debian build enabling SSH is easy, simply

sudo mv /boot/boot_enable_ssh.rc /boot/boot.rc
sudo service ssh start

Access the RPI via SSH

Having secure remote access to your RPi means you can access it for any computer on your network or if you configure your router properly from any computer via the internet.

If you do want to access the RPi via the internet, make sure you at least Setup:RPI#Change_Default_Password and ideally AddingUsers:RPi in order to prevent unauthorised access.

Connect via SSH on a Local network

This is best done via another linux box (assumed here). or you can use [Putty under Windows].

From a Linux terminal code

ssh jack@192.168.0.20

remember to change the username and IP address of to match those of our RPi!

The first time you do this you'll probably be presented with something like this.

The authenticity of host '192.168.0.20 (192.168.0.20)' can't be established.
RSA key fingerprint is 26:a4:a1:aa:c2:ff:50:99:d7:e1:49:6a:f2:90:fb:90.

type yes and press return to authorise the ssh key as valid and save it for the future.

You should be presented with a password prompt like

jack@192.168.0.20's password:

Enter the password and, you're in!

Forwarding the X terminal

you may need to check that the following line is in your /etc/ssh2/sshd2_config file:

AllowX11Forwarding              yes

then simply start the ssh session with the -X option.

ssh –X user@192.168.0.20 &

Trouble shooting SSH

If you get messages saying "No route to host", then check the ip address is valid using

ping 192.168.0.20

if the address isn't found then your local PC can't find the RPi. Things to check

  1. IP address on the RPi, login locally and type hostname -I . This should give you the IP address of the RPi.
  2. Check the IP and netmask of your PC, make sure they are on the same subnet see [1] for more information.
  3. Consider setting up a static IP address for your RPi Static_IP_Config