Giter Club home page Giter Club logo

Comments (6)

tfredian avatar tfredian commented on May 23, 2024

I will look into this. This used to work in the past with a couple different ssh packages for windows but this was prior to switching the windows builds to use mingw64 so perhaps there is either some incompatibility or the compiles with mingw64 exposed some bugs. I would prefer not to include plink in the MDSPlus distributions. To use plink with the existing ssh plugin you would need to make an ssh.bat file and put it in your PATH which would in turn run plink. It would be possible to make a simple plink plugin for mdsip which would only require the plink.exe to be in your PATH. There are also rumors about Microsoft finally providing traditional ssh client and server implementations too.

In any event I will see if I can track down the problem with the tunneling plugin on windows. It is currently segfaulting very early in the connect code which constructs a shell command, opens pipes for stdin and stdout and creates a subprocess to run the command. stdin and stdout are then just used to communicate through the ssh connection. Used to work but does not now.

from mdsplus.

zack-vii avatar zack-vii commented on May 23, 2024

related #231

from mdsplus.

tfredian avatar tfredian commented on May 23, 2024

Timo Is this still a problem or was it fixed with: #231 ?

from mdsplus.

zack-vii avatar zack-vii commented on May 23, 2024

Hm I cannot get it to work.. when executing from Linux the ssh login and remote call of mdsip-server-ssh does not return. However, the windows variant does after you entered you password. It does not return anymore if you replace %2 with ". /etc/profile;%2".
however when executed via mdsconnect ()eg in MATLAB of tditest) the password prompt does not show and the process hangs.
The plink support does not seem to work either.

it returns Error in connect
mdsopen: Could not open connection to MDS server
0

probably due to a incorrect translation of the ssh datastream done by plink.

plink -agent -batch -L 8000:%server%:8000 %user%@%server% -N
does open a tunnel which can then be used by mdsconnect to localhost
maybe that is a good work around
the code could open this tunnel internally and then redirect the data streams

from mdsplus.

MDSplusBuilder avatar MDSplusBuilder commented on May 23, 2024

Weird. This worked without a hitch on my windows system with plink. I'll
try it again to make sure.

On 12/15/2015 11:06 AM, zack-vii wrote:

Hm I cannot get it to work.. when executing from Linux the ssh login
and remote call of mdsip-server-ssh does not return. However, the
windows variant does after you entered you password. It does not
return anymore if you replace %2 with ". /etc/profile;%2".
however when executed via mdsconnect ()eg in MATLAB of tditest) the
password prompt does not show and the process hangs.
The plink support does not seem to work either.

|it returns Error in connect mdsopen: Could not open connection to MDS
server 0 |

probably due to a incorrect translation of the ssh datastream done by
plink.

plink -agent -batch -L 8000:%server%:8000 %user%@%server% -N
does open a tunnel which can then be used by mdsconnect to localhost
maybe that is a good work around
the code could open this tunnel internally and then redirect the data
streams


Reply to this email directly or view it on GitHub
#167 (comment).

from mdsplus.

tfredian avatar tfredian commented on May 23, 2024

I just verified this works with plink on a clean install of putty with mdsplus-alpha-7.0.196 and mdsplus-alpha-7.0.197. The steps I used to test this is:

  1. Download and install putty-0.66-installer.exe from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
  2. Run PuttyGen (Putty) and import an open-ssh2 private key which can be used to connect to the remote mdsplus system via ssh and export it in ppk format.
  3. Run the Pagent utility (Putty) and add a new key selecting the ppk file.
  4. From cmd.exe prompt do: plink username@mdsplus-system-host to ensure you can connect without password. Save the host's credentials into putty's known host cache.
  5. Try 4 again to make sure it connects without any additional prompting.
  6. Install MDSplus (I just downloaded and installed mdsplus-alpha-7.0.197).
  7. run tditest and enter the following:
    mdsconnect('ssh://username@mdsplus-system-host')
    mdsvalue('getenv("some-known-env-on-remote-host")')

The above worked fine on my system (Windows 10 clean install). It had also worked on Windows 7 prior to the Window 10 install with mdsplus-alpha-7.0.196.

Note that the username@ is needed in the connection string otherwise plink will prompt for the username which breaks the mdsip tunneling.

from mdsplus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.