[SailfishDevel] Connecting to the Sailfish SDK / Emulator via WinSCP?

christopher.lamb at thurweb.ch christopher.lamb at thurweb.ch
Sat Apr 20 14:50:16 UTC 2013


Hi Jonni

Thanks, that works a dream from my Windows 7 laptop (next step is to  
get this working from a Windows 7 VM on OSX....).

As this took me a few stabs to get working smoothly here is a more  
verbose guide to connecting to the SDK and Emulator from WinSCP

For those who don't know WinSCP, it's an excellent File Transfer tool  
in the style of Norton Commander / Total Commander. It is one of the  
easiest ways of transferring files from Wndows to Unix, and for  
navigating a remote Unix instance.


Step 1: generate the private and public key

in PuttyGen (bundled with WinSCP)

Choose SSH-2 RSA 2048 bit

Click Generate

Doodle around with you mouse when instructed (and keep doodling until  
the key is generated)

Step 2: save the private key
Hit the button save private key.
Choose a suitable name and location, I put mine in the same directory  
Sailfish uses:
C:\Users\<your user directory here>\.ssh\SailfishOs.ppk
This is the key that you will use from WinSCP to connect to both the  
SDK and Emulator.

Step 3: Append the new public key to the 4 authorized_key files:

Copy the public key from the box at the top of the screen, making sure  
you get the whole thing (on my first attempt I only got part of it ...)
The key should start with "ssh-rsa " and end with "==  
rsa-key-YYYYMMDD" where YYYYMMDD is the current date.

Open the following 4 files:
C:\SailfishOS\mersdk\ssh\root\authorized_keys
C:\SailfishOS\mersdk\ssh\mersdk\authorized_keys
C:\SailfishOS\emulator\ssh\nemo\authorized_keys
C:\SailfishOS\emulator\ssh\root\authorized_keys

Hit enter, then paste the key (i.e. append to existing content). These  
files will now have two keys.
Save

Step 4: Connecting from WinSCP to the SDK
Open WinSCP
Setup a new session:
File Protocol: SCP
Hostname: localhost
Port number: 2222
Private key file: C:\Users\<your user directory here>\.ssh\SailfishOs.ppk

Hit Save and choose a suitable name (e.g. "Sailfish root MERSDK")
Hit Login to connect.

Step 5: Connecting from WinSCP to the Emulator
as for Step 4, using port 2223

Have fun

Chris

Zitat von "Jonni Rainisto" <jonni.rainisto at jollamobile.com>:

> open puttygen.exe -> create key -> save -> copypaste the key string  
> from to ui and _append_ it into wanted authorized_keys-file (located  
> in  
> c:\SailfishOS\[mersdk|emulator]\ssh\[root|mersdk]\authorized_keys),  
> so in 4 different files if you want to enable it in both emulator  
> and sdk and for both root and mersdk users.
>
> I just tested this with WinSCP and it works.
>
> re, Jonni
> ________________________________________
> From: devel-bounces at lists.sailfishos.org  
> [devel-bounces at lists.sailfishos.org] on behalf of  
> christopher.lamb at thurweb.ch [christopher.lamb at thurweb.ch]
> Sent: Saturday, April 20, 2013 11:43 AM
> To: devel at lists.sailfishos.org
> Subject: [SailfishDevel] Connecting to the Sailfish SDK / Emulator  
> via  WinSCP?
>
> Hi All
>
> Has anyone succeeded in connecting to the Sailfish SDK or Emulator VMs
> via WinSCP?
>
> Having got a little tired of navigating on the command line, I thought
> I would cheat by using WinSCP. However it grumbles at the key format.
> The supplied conversion tool PuttyGen does recognise the format either.
>
> Ciao
>
> Chris
>
>
> _______________________________________________
> SailfishOS.org Devel mailing list
>





More information about the Devel mailing list