![]() |
|
I found another possible workaround; I am leaving the default shell to `cmd.exe`. But if I execute this command on the client:
I am landing on the bash shell. However, this cannot be use PHPEd because the Account UI for SSH Terminal Accounts, there is no option to add SSH "commands". If there were a choice, possible this could be a possibility. |
||||||||||||||
|
|
|||||||||||||||
|
Site Admin
|
If I read this right, you don't want to use cygwin's sshd (openssh) but windows sshd (openssh) because it's your prod and I guess you have some other integrations that relies on cmd.
May be you can setup a different User account for debugger and configure windows sshd to lauch cygwin bash automatically? there is %programdata%sshsshd_config, where you can set
Does this solve the problem? |
||||||||||||||
|
_________________ The PHP IDE team |
|||||||||||||||
|
Thanks that put me on the right track but needed more work. I tried `ForceCommand` the shell directly but it didn't work. The SSH starts but debugger never completes. But if I call the .bat file of Cygwin it works. I think it's because if I call the shell directly it doesn't allocate a TTY terminal while executing. That is why when I executed form the ssh client command, I needed to include the -t parameter.
However, as before, with any of both methods, the SFTP for this user didn't work. I didn't want to create a new user only for SFTP. I did more research and I found that when the `ForceCommand` is used, it overrides any other requested command. This is the root problem, when a STFP request is called the subsystem tries to run the `sftp-sever.exe` command, but because we are forcing it into another command then this is not executed anymore on SFTP. So, I created a new .bat for Cygwin to detect when there was a command to start with. The original `cygwin.bat` contained this:
The improved version named `cygwin-mod.bat` contains this:
Now on the `sshd_config` I have to be sure that contains these commands:
With this, I can run SSH bash debugger on PHPEd and SFTP with the same user account, without forcing other accounts to use bash and/or potentially breaking the SFTP. Now a final possible improvement request (annoying but not show-stopper). The TTY terminal used on PHPEd is very utilitarian and not practical or user friendly (or maybe not modern standard). For example, it doesn't allow copy and paste, some advance ANSI codes are not render (e.g. DIR_COLORS), the bash history is not saved, arrow keys up and down does nothing. All these works properly when SSH from Windows terminal, PuTTY or MinTTY so it's no problem with the shell. |
||||||||||||||||||
|
|
|||||||||||||||||||
|
Site Admin
|
Good job welding together two platforms -- the Unix-ported toolset and the Windows-ported version of OpenSSH originally built for Unix
As of TTY -- the history -- it is handled on the shell (server) side, so it’s controlled by your Cygwin bash/zsh configuration files in the Cygwin home directory. You can add something like set +o history to your ~/.bashrc, or configure it globally via files in /etc/profile.d/ for all Cygwin users. First, check whether Ctrl+R works -- it triggers reverse history search. When you press it, bash should enter this mode. Start typing part of a previous command to search; if there are multiple matches, keep pressing Ctrl+R to cycle through them, then press Enter to select or Esc to cancel. -- copy-paste -- they should work with Ctrl+Ins / Shift+Ins. You can also enable auto-copy so that selecting text with the mouse copies it automatically. -- up-down -- the TERM variable may need adjustment in your ~/.bashrc. PhpED’s terminal supports only a subset of XTERM/XTERM256 features. If you have access to a Linux (like real linux or linux on windows) system, test it there and replicate any missing environment settings in your ~/.bashrc. It’s also possible that some required libraries for xterm support under Cygwin are not installed on the bash side. -- DIR_COLORS -- it’s likely related to the same terminal capability configuration. -- PuTTY supports a wide range of terminal types -- not just xterm, which may explain the difference. Find an xterm client created to test / validate shell and run it to validate your shell setup independently of both PuTTY and PhpED |
||||||||||||
|
_________________ The PHP IDE team |
|||||||||||||
|
I will try those keystrokes to see if I get any solution (Oh my god I have not used Ctrl+Ins / Shift+Ins since Windows XP). As I said, it not big deal, but when I am debugging CLI scripts, sometimes I want to copy the output for reference between runs.
Yes, I have a bunch of Ubuntu servers, it will compare how the default shell files are configured to see if there is something that can be adjusted on the Cygwin shell. Thank you Dmitri for your help and guidance. Let's complete this issue here. I tried to document all the steps required in case somebody else has this issue too. |
||||||||||||
|
|
|||||||||||||
| Remote CLI SSH debug on Windows server does not from the IDE |
|
||
|
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by


RSS2 Feed