Secure access to PS3's YDL desktop from Windows PC

YDL running on the Sony Playstation 3

Moderator: billb

Secure access to PS3's YDL desktop from Windows PC

Postby billb » 19 May 2007, 18:19

I have a PS3 with YDL 5.0.1 installed on my home network along with various Windows PCs. The PS3 is connected to my home theater projector -- the only high-def display I have which supports HDCP. While having a 140" diagonal screen is nice, I don't want to use it all the time.

This is how I access the remote desktop of my PS3 running YDL 5.0.x using a PC running Windows XP (should work for Windows 95/98/ME/2000/XP/Vista).

These instructions assume you are running Yellow Dog Linux 5.0.x on a PS3, you’re running a GNOME desktop, and that you installed the default apps. Also, it will help if your YDL PS3 is set up with a static IP address instead of requesting one automatically from your router’s DHCP server, but it isn’t absolutely necessary.

1. On the PS3, Select ‘Remote Desktop’ from the System / Preferences drop down menu. This will bring up the Remote Desktop Preferences window. Make sure you have “Allow other users to view your desktop” and “Allow other users to control your desktop” checked. Uncheck “Ask for confirmation”. Check “Require the user to enter this password” and enter a good password. Select Close and your VNC Server setup will be complete.


2. If you want to make sure your Remote Desktop / VNC Server is up and running, start VNC Viewer from the Applications / Accessories menu. In the resulting VNC Viewer window, enter localhost.localdomain:0 for the VNC server. This will bring up a VNC window with a duplicate of your desktop in it. Oooooh... shiny... Don’t be surprised if you see some strange effects – you are looking at a copy of your desktop which has a copy of your desktop which has … well, you get the idea. Close this window and proceed to Step 3.


3. While you’re still at the PS3, make sure you have an SSH Server running. Go to the drop down menu item System / Administration / Server Settings / Services. It will most likely ask you for your root password before opening the Service Configuration window. In the bottom left corner, scroll down until you see a service called sshd. It should be checked. Close the Service Configuration window.


4. Before you move to your Windows PC, make sure you know the IP address assigned to your PS3. If you have already assigned a static IP this won’t be necessary since you already know it, I hope. To determine your IP address, open a terminal window and enter the following commands:

su -l root

(This will prompt you for your root password. Not necessary if you are already logged in as root)

ifconfig

Your PS3’s local IP address should be on the second line of output, something like this:

inet addr:192.168.1.104 (this number will vary)

In this case, the IP address would be 192.168.1.104


5. Moving to your Windows PC, you’ll need a program called PuTTY, a Telnet and SSH client with port forwarding capabilities. Download the Windows installer from here and install it:

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

When PuTTY is started it will open a PuTTY Configuration window. Categories are listed on the left, and options on the right.

Go to the SSH / Tunnels Category. Enter 5900 for the Source Port.

Enter localhost:5900 for the destination.

Click Add, and this line should show up in the Forwarded ports list:

L5900 localhost:5900

5900 is the default port used for the VNC traffic.

Now go back to the top category, Session. Under ‘Host Name (or IP address)’, enter your PS3’s IP address (sticking with the example from Step 4, it would be 192.168.1.104).

Under “Saved Sessions” enter PS3 (or whatever you want to call it) and click Save.

Now try to open a connection to the SSH server on your PS3 by clicking on ‘Open’ at the bottom of the PuTTY configuration window.

If we’ve done everything correctly you should get a terminal window showing ‘login as:’

Enter the username you normally use to access your desktop on the PS3, followed by the password for that account on the next line. Now you should be logged in to secure shell server on your PS3. Leave this window open – you will need to remain connected as long as you’re running the VNC Viewer to access the desktop on the PS3.


6. Now you need VNC Viewer on your Windows PC to access the remote desktop / VNC Server on your PS3. Download and install the latest version from http://www.realvnc.com. There is a free edition with reduced features that works fine.

Once you have VNC Viewer installed (you don’t have to install the Server software if you don’t think you’ll want to access your Windows PC from your PS3), start the VNC Viewer program.

For server, enter:

localhost:0

And click OK to connect.

If all goes well, it should ask you for the password for the Remote Desktop you created back in Step 1, and in a moment you’ll see the desktop of your PS3.


Conclusion:

You are accessing your PS3's remote desktop with VNC Viewer through an SSH tunnel. All this trouble could be avoided by "poking a hole" in your YDL firewall under the menu item System / Administration / Security Level and Firewall, adding port 5900 to the list, but the free version of VNC Viewer does not provide any encryption.

PuTTY has some options to play with, some of which will improve the experience. The free version of VNC viewer from RealVNC.com does not support scaling, so you may have to scroll around the desktop depending on the resolution of your Windows PC.


References:

Securing a VNC connection with OpenSSH
http://trekweb.com/~jasonb/articles/vnc_ssh.shtml

Updated 11/17/07:
Thanks to oz2kso for a fix under Step 5.
billb
 

"Connection unexpectedly closed"

Postby oz2kso » 16 Nov 2007, 09:33

I had exactly the same problem: "Connection unexpectedly closed"

The "dog is buried" in the PuTTY setup section of your otherwise very nice proceedure:

Code: Select all
L5900 localhost:5900
(127.0.0.1 or whatever), not the ip address of the server machine!!!

What the logic in that is, I don't know, but it works ;o)
We probably can't complain about this otherwise fine peace of free SW...

NOTE:
The HKEY_LOCAL_MACHINE\Software\ORL\WinVNC3\ setting:
AllowLoopback as surgested as a solution other places, does not work!
The setting only applies to the windows VNC server...

Also changing settings the SSHD_CONFIG file doesn't seem to be necessary on the YDL PS3...
It might be wise to change the PermitRootLogin to no, though.
BR
Kenneth

/*************************
Linux on PlayStation3
Supercomputing for everyone
http://ps3.happyshark.dk/
*************************/
User avatar
oz2kso
ydl newbie
ydl newbie
 
Posts: 1
Joined: 16 Nov 2007, 09:01
Location: Denmark

Re: "Connection unexpectedly closed"

Postby billb » 16 Nov 2007, 15:37

oz2kso wrote:I had exactly the same problem: "Connection unexpectedly closed"

The "dog is buried" in the PuTTY setup section of your otherwise very nice proceedure:

Code: Select all
L5900 localhost:5900
(127.0.0.1 or whatever), not the ip address of the server machine!!!

What the logic in that is, I don't know, but it works ;o)
We probably can't complain about this otherwise fine peace of free SW...


I was surprised to see a response to this Howto I wrote back in May! :D

Thanks for the help ... but how does the remote machine (the Windows PC) know the IP address of the SSH server machine (the PS3 in this case) if we don't enter it in PuTTY?

EDIT: On my second cup of coffee. :) I think I see now ... the server IP is entered here:

"Now go back to the top category, Session. Under ‘Host Name (or IP address)’, enter your PS3’s IP address (sticking with the example from Step 4, it would be 192.168.1.104)."

Soon as I get a chance I'll give this a try and update the guide. Thanks again for your help.

EDIT 11/17/07: Updated the guide with the above mentioned fix. :D
User avatar
billb
Site Admin
Site Admin
 
Posts: 5522
Joined: 24 May 2007, 20:30
Location: Eastern NC, USA

Postby NuxIT » 09 Jan 2008, 10:40

Thanks for another great guide billb. I managed to mess around with this tonight. I was hoping to find a way to use vncserver through the enlightment GUI.

I did manage to get a very nice looking vncviewer connection working by following this guide and using gnome which made it much easier. I just typed vncviewer 192.168.0.55:5900 on my ubuntu terminal session and it connected fine.

I also managed to add the firewall rule using to allow 5900 over tcp using the gui firewall manager in englightment. Now I can connect without disabling the firewall iptables.

When I went into enlightment their is no option through the menu to choose vncserver or remote desktop. I'd imagine since I'm missing those steps to configure the vncserver it's giving me this error when trying to run the vncserver by typing /etc/init.d/vncserver start
Starting VNC server: no displays configured

Any ideas how to get this working in enlightment? From what I've gathered I probably need a configuration in my /home/.vnc/ area but their are no files here. I'd sure like to get it working in englightment. TBH, Chris

EDIT!

Sweet! I just got the ssh tunneling working following your guide. I removed the allow 5900 tcp firewall rule to make this more secure. Now it's working following your guide on my winxp box and putty! Thanks again and any help on getting this working in enlightment is appreciated. Regards

EDIT: For anyone that wishes to get VNC working in the enlightenment GUI follow this guide >
http://www.insomniacgames.com/tech/articles/0807/files/configuring_vnc_server_on_ps3.pdf
It worked great for me.
Back on the attack after using 5.0.2. Ready to get this 6.2 up and running!
User avatar
NuxIT
ydl lover
ydl lover
 
Posts: 52
Joined: 28 Nov 2007, 00:23
Location: Westminster

Re: Secure access to PS3's YDL desktop from Windows PC

Postby cyberneticdna » 13 Sep 2008, 21:43

I have done this before and it worked fine. I did a reinstall on my ps3 and set up everything again. When I open up a session in putty on Windows Vista it logs in fine, but when I open VNC and input localhost:0 I get "The connection closed unexpectedly. Do you wish to attempt to reconnect to localhost:0?" How do I troubleshoot this? I checked everything on my ps3 and it is set up properly and I checked everything on vista and I followed the instructions exactly. I check my services and my terminal services are enabled under vista. I ping my ps3 and got a reply so I know my network is set up properly. I turned off my firewall and it still doesn't work. Do you have any suggestions?
cyberneticdna
ydl lover
ydl lover
 
Posts: 55
Joined: 24 Apr 2007, 16:56
Location: Tennessee

Re: Secure access to PS3's YDL desktop from Windows PC

Postby billb » 14 Sep 2008, 02:39

Is this connection over a local network or remote? I've had some trouble with it from a remote connection, but not on my local network. Also, my familiarity with Windows ends with XP ... haven't used Vista much at all.
PS3 60GB [CECHA01], FW 3.15, YDL 6.2, Samsung T260HD @ 1920x1200
Powermac G4 1.25 GHz x2, 2 GB RAM, YDL 6.2
User avatar
billb
Site Admin
Site Admin
 
Posts: 5522
Joined: 24 May 2007, 20:30
Location: Eastern NC, USA

Re: Secure access to PS3's YDL desktop from Windows PC

Postby CronoCloud » 14 Sep 2008, 09:04

billb wrote:Is this connection over a local network or remote? I've had some trouble with it from a remote connection, but not on my local network. Also, my familiarity with Windows ends with XP ... haven't used Vista much at all.


Graphical remote access works best over a local network connection since it's sending a lot of data. Non local remote will be slow and will have more of a tendency to lock up or lose connection. You'll also have to setup up your port forwarding and/or firewall properly. Personally I prefer X11 forwarding via SSH over VNC, easier to get my regular desktop that way, but that requires an X server on your Windows machine. Now if I wanted to access the windows machine from Linux, I'd use VNC.

I still haven't installed an X server on Vista, the old XP laptop has Cygwin, but that takes up quite a bit of space.

Ron Rogers Jr (CronoCloud)
CECHE01 PS3 (MGS4 80GB Bundle) without OtherOS and with an upgraded 320GB HD
Running Fedora 23 on a Compaq Presario CQ5320F upgraded with a Phenom X4 and GT640
Vizio E221A1 22" 1080P TV with HDMI, using 1080P over HDMI
PSN ID: CronoCloudAuron
User avatar
CronoCloud
Moderator
Moderator
 
Posts: 523
Joined: 21 Oct 2006, 05:48
Location: Central Illinois, USA

Re: Secure access to PS3's YDL desktop from Windows PC

Postby ppietro » 14 Sep 2008, 09:19

CronoCloud wrote:I still haven't installed an X server on Vista, the old XP laptop has Cygwin, but that takes up quite a bit of space.


You should try xming:
http://www.straightrunning.com/XmingNotes/

It's the same X Server that Cygwin uses - they're both from the X.org source - but without the rest of the Cygwin Unix underpinnings.

I've been using it a lot - it's very cool. :D

The website is a little confusing. You want to load the Public Domain Release of Xming and Xming-fonts

Xming-mesa is for software OpenGL rendering - you don't need this because the normal Xming uses hardware accelerated OpenGL. Xming-portable-PuTTY is for portable devices that can't access the registry - you don't need this either since normal Xming includes a standard PuTTY that has one small registry entry.

Cheers,
Paul
User avatar
ppietro
Site Admin
Site Admin
 
Posts: 4965
Joined: 13 Sep 2007, 22:18

Re: Secure access to PS3's YDL desktop from Windows PC

Postby CronoCloud » 14 Sep 2008, 09:53

ppietro wrote:You should try xming:
http://www.straightrunning.com/XmingNotes/

It's the same X Server that Cygwin uses - they're both from the X.org source - but without the rest of the Cygwin Unix underpinnings.

I've been using it a lot - it's very cool. :D

The website is a little confusing. You want to load the Public Domain Release of Xming and Xming-fonts


Ahh, excellent, X server without all the cygwin extras (I think a full cygwin install is 2 - 3 gigs)

Xming-portable-PuTTY is for portable devices that can't access the registry - you don't need this either since normal Xming includes a standard PuTTY that has one small registry entry.


That's for USB keys?

Thanks Paul, you just saved the Vista laptop some drive space. You wouldn't believe how much space the default OEM Vista install takes. Admittedly it does run well on it. http://www.walmart.com/catalog/product. ... id=9720310 That's right, I'm saying nice things about Vista on a Linux board. I'll even say that I like the new Vista file explorer more than XP's. Sure it's slower, but it works much more like Rox, Thunar, or Nautilus. Then again, I tend to use the Vista machine only for Second Life, it's for the rest of the family's use more than mine.

Ron Rogers Jr. (CronoCloud)
CECHE01 PS3 (MGS4 80GB Bundle) without OtherOS and with an upgraded 320GB HD
Running Fedora 23 on a Compaq Presario CQ5320F upgraded with a Phenom X4 and GT640
Vizio E221A1 22" 1080P TV with HDMI, using 1080P over HDMI
PSN ID: CronoCloudAuron
User avatar
CronoCloud
Moderator
Moderator
 
Posts: 523
Joined: 21 Oct 2006, 05:48
Location: Central Illinois, USA

Re: Secure access to PS3's YDL desktop from Windows PC

Postby cyberneticdna » 15 Sep 2008, 14:08

I appreciate the suggestions!!. I attempted to follow the tutorial for x-ming but it wasn't as easy to follow as the putty, vnc tutorial. I have already reinstall ydl 6 I may try tonight to get x-ming up on my vista box. You guys got any links that may have easy to follow tutorials for x-ming. I appreciate it.
cyberneticdna
ydl lover
ydl lover
 
Posts: 55
Joined: 24 Apr 2007, 16:56
Location: Tennessee

Re: Secure access to PS3's YDL desktop from Windows PC

Postby CronoCloud » 16 Sep 2008, 19:47

I used this HOWTO by PS2 Linux kit user "Sauce"with my PS2 Linux kit, something similar should work with YDL. We could use SSH2 instead of having to use SSH1 like we had to do with the PS2.

Next thing you want to do is make things so that it does not ask you for a password each time you connect, and so that you don't have to hard-code your password in your Visual Studio project files.


1. Run c:\puttygen.exe
2. Make sure SSH1 (RSA) is selected
3. Click Generate
4. Move your mouse as instructed to generate the key
5. Click on save public key and save it. I'll use the filename c:\ps2key.pub
6. Click on save private key and save it. I'll use the name c:\ps2key.ppk
It'll warn you that you're saving the key without a passphrase. It basically means that if anyone gets their hands on ps2key.ppk, they'll be able to sign on to your PS2 as your user name, provided that they can get to your PS2 and know your user name.

What you have now is a pair of matching files that will act as your password. One of these files needs to sit on the ps2, and the other one needs to be accessible by your PC. They are a "public" key that the whole world can know and a "private" key that you keep to yourself, kind of like your password. The two keys are linked together, so if something is "locked" with the public key, it can be unlocked only with the private key. To configure your ps2:

1. Transfer the file ps2key.pub over to your PS2 using your favorite method, such as samba. For example, on your PC type:
copy c:\ps2key.pub \\myps2\sauce
2. On your ps2, make sure there is a .ssh directory in your home directory.
mkdir ~/.ssh
chmod 755 ~/.ssh
3. cat ps2key.pub >> ~/.ssh/authorized_keys
This step says that anyone who has the private key that matches the public key you just gave it should be able to log on to your system.
4. chmod 600 ~/.ssh/authorized_keys

Now test it from your PC. Run:
c:\plink sauce@myps2 -1 -i c:\ps2key.ppk ls
You should see your directory listing without being prompted for a password.
If this doesn't work, go back and double check your work.

For the following examples my Linux box's IP was 192.168.1.100 and my windows box's IP was 192.168.1.101
Then all I had to do was startup Cygwin and:
Code: Select all
ssh -Y -1 192.168.1.100

and start fluxbox manually in the term.

You can even just remote X over telnet, I know, I know, it's not secure like SSH, but it's quick and easy for a connection over your own secure network.

In that case you'd start up your X server on windows, telnet in and in my case:
Code: Select all
xhost +192.168.1.101
export DISPLAY=192.168.1.101:0.0


And then start fluxbox.

Ron Rogers Jr. (CronoCloud)
CECHE01 PS3 (MGS4 80GB Bundle) without OtherOS and with an upgraded 320GB HD
Running Fedora 23 on a Compaq Presario CQ5320F upgraded with a Phenom X4 and GT640
Vizio E221A1 22" 1080P TV with HDMI, using 1080P over HDMI
PSN ID: CronoCloudAuron
User avatar
CronoCloud
Moderator
Moderator
 
Posts: 523
Joined: 21 Oct 2006, 05:48
Location: Central Illinois, USA

Re: Secure access to PS3's YDL desktop from Windows PC

Postby andehh » 19 Sep 2008, 19:21

Hi All,

Thanks for this guide! I can now connect to the PS3 through VNC but only if I log in locally first. I've borrowed the keyboard and mouse from my desktop PC to get it all up and running but I'd now like to be able to just turn the PS3 on with nothing plugged in, and connect through VNC on my laptop. PuTTY connects ok but VNC gives me the Connection Suddenly Closed error. Any help would be appreciated.

Thanks

Andy
andehh
ydl newbie
ydl newbie
 
Posts: 3
Joined: 19 Sep 2008, 09:36

Re: Secure access to PS3's YDL desktop from Windows PC

Postby CronoCloud » 06 May 2009, 07:38

If you want to use your regular LInux desktop's window manager under Xming you can run xming with the -nodecoration option instead of -multiwindow (which uses xmings own window manager that lets you run individual apps) Just set it in the shortcut properties.

Ron Rogers Jr. (CronoCloud)
CECHE01 PS3 (MGS4 80GB Bundle) without OtherOS and with an upgraded 320GB HD
Running Fedora 23 on a Compaq Presario CQ5320F upgraded with a Phenom X4 and GT640
Vizio E221A1 22" 1080P TV with HDMI, using 1080P over HDMI
PSN ID: CronoCloudAuron
User avatar
CronoCloud
Moderator
Moderator
 
Posts: 523
Joined: 21 Oct 2006, 05:48
Location: Central Illinois, USA

Re: Secure access to PS3's YDL desktop from Windows PC

Postby Jester » 30 Jul 2009, 21:38

When I run VNC viewer from my vista desktop i get this error after typing in my password to connect to linux on my ps3:

"read: Connection resest by peer (10054) /n Do you wish to attempt to reconnect to localhost:0?"

Any ideas?
80GB CECHE01 - YDL 6.1 - PSN ACCT = Jester8648 - BenQ PE8700 Projector
Current Projects: Learning C++ & DIY Wind Turbine
User avatar
Jester
ydl lover
ydl lover
 
Posts: 96
Joined: 20 Jul 2009, 09:43
Location: California

Re: Secure access to PS3's YDL desktop from Windows PC

Postby ppietro » 30 Jul 2009, 23:28

Jester wrote:When I run VNC viewer from my vista desktop i get this error after typing in my password to connect to linux on my ps3:

"read: Connection resest by peer (10054) /n Do you wish to attempt to reconnect to localhost:0?"

Any ideas?


Don't use Vista? :lol:

*rimshot*

Thanks folks - I'll be here all week. Don't forget to try the blue plate special - it's great. And - tip your waitress - they work hard, don't they?

Good night everyone! And don't forget - next week, I'll be at the Holiday Inn in Bayonne!

Cheers,
Paul
User avatar
ppietro
Site Admin
Site Admin
 
Posts: 4965
Joined: 13 Sep 2007, 22:18

Next

Return to Playstation 3

Who is online

Users browsing this forum: No registered users and 68 guests

cron