Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ip_and_network [2016/06/23 20:17]
admin [Static IP Address]
ip_and_network [2019/02/17 19:21]
admin [Static IP Address]
Line 16: Line 16:
 Give the Raspberry Pi a static IP address. Open the interfaces file: 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
- +    # Ethernet 
-     auto eth0:1 +    iface eth0 inet dhcp 
-     iface eth0:1 inet static +    allow-hotplug eth0 
-       address 192.168.0.199 +    auto eth0:1 
-       netmask 255.255.255.0 +    iface eth0:1 inet static 
-       gateway 192.168.0.1+      address 192.168.0.199 
 +      netmask 255.255.255.0 
 +      gateway 192.168.0.1 
 +Or:        
 +    # Ethernet 
 +    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.\\ Save and quit, ctl+o, Return, ctl+x.\\
  
Line 42: Line 53:
      
 ==== Login over SSH ==== ==== Login over SSH ====
-One can login with: +One can login from your computer with: 
-  $ ssh pi@192.168.0.111 +  $ ssh pi@192.168.0.199 
-or with XWindows  support:+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 VNC 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.
  
 +----