Open ThetaGHun opened 5 years ago
P.S.: with Linux server opening the SSH for debugging works, but not with Windows server OpenSSH installed.
I figured out what the issue is: in cPySSHDebugger.pas line 114 you use this
'''import sys,os,tempfile;print(sys.version[0]);print(os.sep);print(tempfile.gettempdir())'''
However, it should this I guess:
'"import sys,os,tempfile;print(sys.version[0]);print(os.sep);print(tempfile.gettempdir())"'
It has " (one double mark) instead of '' (double single marks).
Because then I did run:
python -c 'import sys,os,tempfile;print(sys.version[0]);print(os.sep);print(tempfile.gettempdir())'
I got this back:
File "
", line 1 'import ^ SyntaxError: EOL while scanning string literal
See, the same error !
But when I did run this way:
python -c "import sys,os,tempfile;print(sys.version[0]);print(os.sep);print(tempfile.gettempdir())"
It all worked as expected.
Finally, I did compile it and found a temporary solution (run a remote init.py file instead of using "python -c"). But that is only a temporary solution.
(FYI, I didn't worked in Delphi for almost 25 years.)
Thanks for the bug report. I will have a closer look. But SSHing to Windows machine did work here. Are you using a recent version of OpenSSH from https://github.com/PowerShell/Win32-OpenSSH/releases on both sides?
You may also try putty (see https://pyscripter.blogspot.com/2019/01/ssh-engines-using-putty.html). I know it is being used a lot with success.
I use Win64 version OpenSSH on Win server side and I have Putty on my notebook.
If you want it, I can grant you temporary access to my VPS. So, you can take a closer look. (I know how hard it would be to debug if you have an other config.)
But which version of ssh? e.g.
C:>ssh -V OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
when I configured my remote connection to Win2016 server and trying to activate it this message comes up:
Failed to execute Python (“C:\Python2\python.exe) on the SSH server ReturnCode: 1 Output: ErrorOutput: File’, line 1
import
SyntaxError EOL while scanning string literal