Before you can connect, you need to know the IP address of your Pi. In XBMC this is avilable under Settings -> System Info -> Network. If you are on another distribution, or XBMC fails to start, log in to the Pi and then type
you will get output like
eth0 Link encap:Ethernet HWaddr b8:27:eb:1c:f1:81
inet addr:192.168.1.67 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::ba27:ebff:fe1c:f181/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:442 errors:0 dropped:0 overruns:0 frame:0
TX packets:241 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:41480 (40.5 KiB) TX bytes:32093 (31.3 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Hosthttp://www.raspbmc.com/wp-content/uploads/2012/10/pscp.png
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
you need the IP address on eth0, if you have the ethernet lead plugged in – 192.168.1.67 in this case.
Linux And OS/X
If you wish to connect from Linux or OS/X, open a terminal session and simply type
ssh <username>@<ip address>
replacing <username> and <ip address> accordingly – the username is usually pi in the Pi distributions based on the Debian image, including RaspBCM. So in the case above it would be
the first time you connect this may ask you something like
The authenticity of host '192.168.1.67 (192.168.1.67)' can't be established.
RSA key fingerprint is ad:4d:14:4d:74:19:fa:f1:fa:c6:ee:81:36:29:be:f4.
Are you sure you want to continue connecting (yes/no)?
if so, just answer “yes”. This should then prompt you for the password – the default for the pi user is raspberry (all lower case) and you should then be logged into your pi.
Copying Files To Or From The Pi
In addition to the ftp server, you can also use scp to copy files to or from the pi from a Linux or OS/X shell. The command is
scp <source> <destination>
The local file is referenced as normal in the shell.
The remote location is referenced thus:
The path can be absolute, such as /usr/tmp/ or it can reference the home directory by using ~/ (this, and its subdirectories, are probably the only locations the pi user has write access to). If you just specify a directory the original filename will be preserved – it’s usually a good idea to end the path with / in this case, as it will give an error if the directory doesn’t exist, otherwise it will use the intended directory name as the destination filename. Otherwise you can, if you so desire, specify an alternative name for the file.
A couple of examples:-
copying a zip file from the local machine to the pi’s home directory
scp /data/Downloads/RaspberryPi/repository.mossy.zip firstname.lastname@example.org:~/
copying a log file from the pi, to the current directory on the local machine
scp email@example.com:/home/pi/.xbmc/temp/xbmc.log ./
There’s a good Windows SSH client called PuTTY (note the legal warning regarding use of encryption software). Download putty.exe and run it.
In the “Host Name (or IP address)” box put the IP address of the server
The first time you connect it will ask you if you trust the host – select [Yes]
Then you can log in.
The default username is pi and the password raspberry (all lower case) and you should then be logged into your pi.
Copying Files To Or From The Pi
On that page there is also PSCP. Download pscp.exe and open a command prompt. You can use the pscp.exe in a similar manner to the Linux scp command, above.
- it doesn’t seem to accept ~/ as a shortcut to your home directory, but specifying no path puts the file into your home directory.
- pscp.exe either needs to be in your path or you need to specify the path to it, for example:-
C:\Downloads\pscp.exe repository.mossy.zip firstname.lastname@example.org:
will copy the repository.mossy.zip file in your current directory to the home directory on the Pi.
There is also a general reference at http://www.nber.org/pscp.html
Vero is the multi-media device you've been waiting for. Click here to find out more.