Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
ip_and_network [2014/10/26 19:53]
admin created
ip_and_network [2016/07/10 17:22]
admin [Miscellaneous]
Line 1: Line 1:
----- +===== IP and Network configuration =====
-**IP and Network configuration** +
-----+
  
-**Set the SSH connection** +==== Enable the SSH Server ==== 
-  +In Raspian Jessie it should be activated allready. If not enable the SSH server by opening the raspi-config:
-For activating the SSH connection open+
   $ sudo raspi-config   $ sudo raspi-config
-In 8. Advanced Options you can activate SSH+In 8. Advanced Options you can activate SSH.
  
 ---- ----
-**Fix IP Address** +==== Static IP Address ==== 
 +Look up your gateway: 
 +  $ netstat -r -n 
 +Find you IP address:
   $ ifconfig   $ ifconfig
-Give the Raspberry Pi an IP address. Open the interfaces file:+or: 
 +  $ ip addr 
 +Give the Raspberry Pi a static IP address. Open the interfaces file:
   $ sudo nano /etc/network/interfaces   $ sudo nano /etc/network/interfaces
 Add these lines after "face eth0 inet dhcp": Add these lines after "face eth0 inet dhcp":
Line 19: Line 20:
      auto eth0:1      auto eth0:1
      iface eth0:1 inet static      iface eth0:1 inet static
-       address 192.168.0.111+       address 192.168.0.199
        netmask 255.255.255.0        netmask 255.255.255.0
-        +       gateway 192.168.0.1 
-Restart ethernet +Or:        
-  $ sudo ifdown eth0 +    # Ethernet 
-  $ sudo ifup eth0+    auto etho 
 +    allow-hotplug eth0 
 +    iface eth0 inet static 
 +      address 192.168.0.199 
 +      netmask 255.255.255.0 
 +      gateway 192.168.0.1 
 +      dns-nameservers 192.168.0.1 
 +       
 +Save and quit, ctl+o, Return, ctl+x.\\
  
----- +Disable the DHCP-Client:\\      
-**Login over SSH**\\+In Raspbian Wheezy: 
 +  $ sudo service dhcpcd stop 
 +  $ sudo update-rc.d -f dhcpcd remove
  
-One can login with: +In Raspbian Jessie: 
-  $ ssh duino-pi@192.168.0.111 +  $ sudo service dhcpcd stop 
-or with XWindows  support:+  $ sudo systemctl disable dhcpcd        
 +        
 +Restart ethernet: 
 +  $ sudo ifdown eth0:1 
 +  $ sudo ifup eth0:1 
 +   
 +Or/and reboot: 
 +  $ sudo reboot 
 +   
 +==== Login over SSH ==== 
 +One can login from your computer with: 
 +  $ ssh pi@192.168.0.199 
 +or with XWindows support:
   $ ssh -XY pi@192.168.0.111   $ ssh -XY pi@192.168.0.111
 PW: raspberry\\ PW: raspberry\\
 +Or install an VPN server: [[vnc|VNC]]
  
 +----
 +
 +==== Miscellaneous ====
 +If the host key verification failed, one can remove the old key with:\\
 +  $ ssh-keygen -R 192.168.0.123
 +And with\\
 +  ~.
 +one can terminate a broken ssh session.
 +
 +----