NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Using PhpEd SSH Terminal to open a tunnel for debugger?


Joined: 18 Oct 2006
Posts: 75
Reply with quote
The help page at http://www.nusphere.com/kb/technicalfaq/howto_run_dbg_ssh.htm explains how to use an ssh session to open a tunnel for remote debugging. Can this be done using the SSH terminal facility built into PhpEd rather than installing something like cygwin?

TIA
View user's profileFind all posts by nickweaversSend private messageVisit poster's websiteYahoo Messenger
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
No, the PhpED terminal does not have tunnelling capability (at least none that I can see). You do not need Cygwin to accomplish this either; simply install Putty! Wink

_________________
Smile
View user's profileFind all posts by annoSend private messageVisit poster's website


Joined: 18 Oct 2006
Posts: 75
Reply with quote
Hi, I have putty installed but could not figure out how to set it up to handle the port forwarding as in the command line "ssh -R 7869:localhost:7869 username@serverhost".

Can you advise?

It would be nice if The PhpEd Terminal SSH support could be enhanced to facilitate thi

Thanks,
Nick
View user's profileFind all posts by nickweaversSend private messageVisit poster's websiteYahoo Messenger
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
I have made the tunnelling settings in Putty and saved it as a session. Under Connections / SSH / Tunnels), add the following settings and save it as a Session:
* Source port: 7869
* Destination: localhost:7869

Then, to run it from the command line, you can call the saved session. With a session name of "My Server", for example, I call:
Code:
"C:\Path to Putty\putty.exe" -load "My Server"

I hope that helps Wink

_________________
Smile
View user's profileFind all posts by annoSend private messageVisit poster's website


Joined: 18 Oct 2006
Posts: 75
Reply with quote
Hi anno,

I tried your settings in Putty but get the following from PhpEd:

Failed to start DBG session

Reason: failed to connect to the client address 127.0.0.1:7869

Digging around further I found this page http://www.nusphere.com/kb/technicalfaq/php_debugger_troubleshoot_ssh.htm which advises opening a terminal session on the server and issuing "telnet localhost 7869" and then checking for black dot inside the white circle in DbgListener icon and something like "01.01.2004 11:11:14 client connected" in the DbgListener log window.

What I get is

>telnet localhost 7869
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host: Connection refused
View user's profileFind all posts by nickweaversSend private messageVisit poster's websiteYahoo Messenger
Veteran

Joined: 06 Jun 2007
Posts: 289
Location: Vancouver, Canada
Reply with quote
The telnet localhost 7869 command should give you a response whenever you are connected (with Putty) and have an SSH tunnel established. In other words, your tunnel is not working yet.

On our RedHat ES servers I found that TCP forwarding (tunnelling) was disabled by default. To enable it, I edited /etc/ssh/sshd_config and added in the following line:
Code:
AllowTcpForwarding yes
After restarting the sshd deamon, things worked like a charm Wink

_________________
Smile
View user's profileFind all posts by annoSend private messageVisit poster's website


Joined: 18 Oct 2006
Posts: 75
Reply with quote
Hi anno, yes you were absolutely right; the "AllowTcpForwarding yes" was commented out in the /etc/ssh/ssdd_fg file so I uncommented it and restarted the deamon.

I still have the same problem though. I'm meeting with one of the sysadmins tomorrow to get some help sorting this out. I'll post back what I find out.

Thanks
View user's profileFind all posts by nickweaversSend private messageVisit poster's websiteYahoo Messenger


Joined: 18 Oct 2006
Posts: 75
Reply with quote
anno,

I had slightly misconfigured the Putty tunnel settings and had the connection the wrong way around. There are some radio buttons in the tunnel section which I had not noticed. Clicking the one for remote sorted things out and it is all working just fine now.

Many thanks for your help.
View user's profileFind all posts by nickweaversSend private messageVisit poster's websiteYahoo Messenger


Joined: 07 May 2012
Posts: 2
Reply with quote
nickweavers wrote:
anno,

I had slightly misconfigured the Putty tunnel settings and had the connection the wrong way around. There are some radio buttons in the tunnel section which I had not noticed. Clicking the one for remote sorted things out and it is all working just fine now.


I'm having this same problem, and am looking for the radio buttons being referred to. This is my first time setting up a remote tunnel, and would love some guidance through the process. In which menu did you find the 'remote' radio button? I've looked under project->project properties and accounts->tunnel accounts. And is there something from the PuTTY end I have to do?

Can't delete this post. Changing my question to http://forum.nusphere.com/can-not-understand-how-listener-starts-t8517.html
View user's profileFind all posts by berashithSend private message
Using PhpEd SSH Terminal to open a tunnel for debugger?
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic