SSH : Maybe The Best Way to Talk to Your Pandora

SSH (Secure Shell) is a well known protocol that allows remote execution of software but it can offer much more and we’re going to see how to use all it can offer. As a side note, in Linux’s world the most commonly used software implementation is OpenSSH (http://www.openssh.org). Enough theoretical stuff, we need action !

How to use SSH

As stated, SSH allows one to execute commands on a remote system. In order to do so you need a SSH server on a remote computer (this is out of the scope of this post but for the lazy people around, you can find a simple tutorial on installing a SSH Server on Ubuntu). To connect to the remote server from your Pandora, just open a terminal and use the ssh command like this :

ssh user@SERVER_IP

It will open a remote shell which work most likely as a local shell and will work on this remote computer

Well nice and now what ?

Issuing commands on the remote computer is mostly useful for server administration and this is not the most common use of the Open Pandora. So let’s see what else we can use SSH for.

Manual file transfer

SSH also provides a way to transfer files from the Pandora to the remote server and vice versa.
The transfer of files is provided by the scp tool.

The basic use of scp is as follows

scp [SOURCE] [DESTINATION]

Ok but this is kind of abstract, so how to put it in practice ?

Imagine we have a rom but it’s on a computer and… well let’s actually do it for real. You can grab the public domain rom here and download it on your computer.

Ok now we have a rom on the computer but it would be much better if it was on the Pandora. Of course, you can download it again on the Pandora, But this would be a waste of time and bandwidth because we already have it sitting right here on the computer. Let’s try to use SSH to quickly transfer the rom to the Pandora via the scp tool.

First you will need to know the following information:
– Your computer’s IP address
– The path you downloaded the file to
And you will need to connect your Pandora’s WiFi on the same network. For our example we will have a computer running SSHD on port 22 (the default port) and the file has been downloaded into the user’s ‘Download’ folder

To download the rom file onto your Pandora from your computer whose IP address is 192.168.0.11 and from the remote path /Users/user/Downloads/Airwolf92.smc, you will just have to issue this command from a terminal on the Pandora (notice the ‘.’ (dot) at the end of the command :

scp  user@192.168.0.11:/Users/user/Downloads/Airwolf92.smc .

This command will ask for user’s password which is the password of the user account on the remote computer and will simply do the transfer.

The file is now on the Pandora and can be launched with any SNES emulator like Snes9x4p. Time to enjoy your rom on your Pandora, time to have fun !

airwolf92

This is great but it will be annoying to manually transfer every file when needed.
Let’s get a Gigolo into the party.

SFTP the sexy way

Gigolo is an application available on Pandora which notably allows you to mount CIFS/SMB shares (aka windows shares). This time we will focus on Gigolo’s SFTP capabilities.

Once Gigolo is started, click the connect button, pick SFTP as a protocol, fill in the required info and here you go. It will mount the remote filesystem to a local folder Pandora folder and allows you to copy from/to it.

Sweet isn’t it ? But there is an alternative
This is the right time for SSHFS !

SSHFS

SSHFS is a FUSE filesystem based on SSH. From a user point of view it just allow to mount a remote SSH server to a local directory.

Let’s get back to where we were. We will delete the rom we transferred on the Pandora and we will access directly from the computer. To do so just issue the follow command in the Pandora Terminal application:

sshfs user@192.168.0.3:/home/user/Rom/rom.smc /media/SDCard/Rom

The file will magically appear on the rom folder of your SD card!

Hope you enjoyed this brief overview of ssh’s awesomeness. Don’t hesitate to investigate this further and comment on your own experience with ssh!

Leave a Reply

2 Comments on "SSH : Maybe The Best Way to Talk to Your Pandora"

avatar
  Subscribe  
newest oldest most voted
Notify of
kickass
Guest

sshfs is great, i use it a lot.
i’d recommend setting the -o ServerAliveInterval flag to prevent occasional fs crashes and possible file corruption.