Saturday, September 27, 2014

raspberry-pi remote ARM compiles via VNC viewer

Running raspberry-pi at home, logging in remotely via vncviewer.  A friend had set up a DNS service which my home PC pings, so I can get to the r-pi from anywhere.  Originally I was doing this to use r-pi as my git repository, but now I can use it as a remote ARM compiler from my laptop.





The only snag I ran into was that after installing vncserver on the r-pi: it wasn't obvious that the port the vncserver serves you have to add 5900 (mines running on :1, so log in via 5901).  Set up port forwarding on the router and an ssh connection.  I'm running from OSX and using the Java (jar) vncclient (tightvnc).

This is NOT secure (well allegedly the passwords are encrypted) - I couldn't get the SSH tunneling to work (even though I can establish an ssh connection in a shell), so ideally this should be on some account that can be wide open.  There are also claims you can avoid vnc programs and just use OSX screen sharing.


No VNC Just SSH Commands
Avoiding the vnc and just running commands over ssh requires entering a password every time (so I'd have to password for scp to the server, ssh command and scp results back).  Pretty tedious.  In OSX that approach also isn't helped by setting the .ssh/config to have:

home *
   ControlMaster = auto
   ControlPath = ~/.ssh/master_%r@%h:%p

That's supposed to use an already existing ssh connection for all subsequent connections.  But it wouldn't make an ssh connection at all on OSX.  On PC it did log in, but it didn't help (with the added adventure of generating an AVG warning when it tries to make the connection - but only if you've set up ControlMaster=auto in the ssh/config)!  Ugh!  On PC trying to run an scp after an ssh was already open still asked for another password.  Debian Linux on rpi apparently doesn't support ControlMaster.


TightVNC on PC
When I ran tightvnc on a PC (Windows Vista running from home), it required me to set up a connection via ssh first (I used cygwin).  I'm not sure why the OSX version of tightvnc (via Java) doesn't use the ssh connection, but the compiled PC version looks like it does.


No comments:

Post a Comment