SSH

Manage Mythtv Setup Using X Windows over SSH

So once you have your MythTV setup and connected to your TV, how do you continue to manage it with just a remote control? Well there are lots of options. There is the obvious solutions like VNC. VNC is nice, but it can be cumbersome, even on a local network segment.

But for things that don't require a "desktop" I like to use X over SSH. It's faster and more responsive than VNC. One of my favorites is when I have to run mythtv-setup. It works great using ssh. To run it remotely from my Mythtv I run the following

ssh user@mythtvbox -CX mythtv-setup

The "-C" turns on compression, which generally speeds things up. The "X" tells ssh to forward an X Windows session for the app to your desktop. It works really nicely. 

You can even do this with the mythfrontend as well. Its just faster if you have some configuring to do than to run around and plug in a mouse and keyboard and sit on the floor 3 feet in front of your 50' LCD TV. But don't expect to be able to stream video that way! :)

 

SSH login using RSA key pairs

Wow was getting ssh logins using RSA key pairs a real pain in the butt. I suppose if everything had been standard Ubuntu things might have worked out of the box... maybe.

In order for me to use the Bazaar Eclipse plugin I needed to setup ssh to my server to not require a password. This is because for some reason, the plugin can't handle any user interface type stuff with ssh. Sigh.

So I did the basics first. 

I ran the following to setup my key pair (I typed in a passphrase when it asked, to make it as secure as possible)

ssh-keygen -t rsa -b 2048

Then to copy it to my home directory on my server.

ssh-copy-id suttonca@myservernamehere

But I still was having issues. It was asking me for a password even after I'd unlocked my RSA key. So I checked /var/log/auth.log on the remote server and found some errors like the following:

Authentication refused: bad ownership or modes for directory /home/suttonca/.ssh

I had to run the following commands to setup the permissions properly before the solution worked.

chmod go-w ~/
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

All that remained was to ensure that everytime I logged in that I was asked to unlock my key. In KDE all I had to do was run the following:

Syndicate content