Archiv nach Schlagworten: SSH

Finding the IP of my Raspberry Pi

With ssh configured the Raspi can be attached using putty after booting.
But how do I know about the IP the raspi got from DHCP? There are several possibilities to look:
1) If there is a screen attached at console the IP can be read there.
But I operate the raspi in different networks just with LAN and power connected only.
2.) In home networks the  web interface of the router (NetGear, FritzBox or whatever) can tell you the IP.
3) For Android users there is a very nice App called ‚fing‘. This app reports all devices on the local network, and the nice thing is, that it tells also which hardware is connected and tells ‚Raspberry Pi Foundation‘ in case of the raspi. I do not know what apps to use with other mobile equipment, but look in the apps store to find the solution.
4) It can also be usefull to operate with the hostname. From a windows PC there is an easy way to be able to call the raspi by name. Samba has to be configured. To use this service it is only neccessary to install and operate samba:

sudo apt-get install samba samba-common-bin
sudo /etc/init.d/samba start

Now with putty you need not to put in the ip it is also possible to enter the hostname.

The hostname can be changed by editing

sudo vim /etc/hosts
sudo vim /etc/hostname

and chage ‚raspberrypi‘ to ‚YourDesiredHostName‘. A short name can be very usefull.
If you want to know the IP address from the hostname open a cmd-Window (Dos-shell) and type
ping raspberrypi
Ping will tell you  the IP address it is pinging to.
5) If you are logged in you can display the IP address with:

hostname -i

or

ifconfig
VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)

von Shell auf anderen Rechner via SSH

wenn man zum Beispiel einen File-Server hat und nicht extra den Rechner wechseln möchte wird oft SSH verwendet. Um dies unter Linux zu nutzen muss erst mit

sudo apt-get install ssh

das SSH-Paket installiert werden und kann dann wie folgt aus der Kommandozeile verwendet werden

ssh -l [benutzer] [rechner]

mit einem -p [port] kann man einen abweichenden Port angeben

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)