When trying to use ssh with an interactive Shell on Windows, I get “Pseudo-terminal will not be allocated because stdin is not a terminal.”
Google says I can correct this by passing
-tt to disable Psuedo-terminal, but then nothing gets fed back to Xojo.
Has anyone gotten Shell to work with Xojo and SSH on Windows?
You know we have SSH2ChannelMBS class in MBS Xojo Network Plugin to do SSH cross platform?
As well as ShellMBS class if the Xojo built-in shell is not enough.
I don’t have much to offer here, but what command are you passing to the Shell initially?
None. I believe
ssh is upset because technically this could be a security issue, it can tell there’s no real user-terminal. I’m just trying to put a user interface to an insane amount of command line work.
I’m really tired of rewriting this project, so if anyone has a project that connects to a server via ssh and handles all the boring stuff so I can work with the commands, I could really use that jumping point.
Now you may know why I wrote all the SSH classes. Because we couldn’t do the password thing otherwise!
I wish your classes would do more. There’s no DataAvailable event, and I’d have to re-implement a lot to authenticate with your methods. Your code makes it hard to follow the authentication procedure. I’m not super excited to rewrite this thing yet again.
It’d be great if one of your examples was a complete ssh terminal.
Tried one of my solutions running under Linux without problems but not under windows, ssh is not gworkkng think because thinks it is a sec issue. Tried to get it with Lazarus, works so I guess it needs a plug-in.
Getting started resources for SSH on windows
Getting started resources for SSH on windows:
Tim, you can target cmd, Powershell or optionally install Bash on windows.
I always use Powershell because it is cross platform (Windows, Mac, Linux). For example I have Xojo web apps that build and manipulate Excel files from Xojo (without Excel installed) on our Linux web servers using Powershell.
Using Powershell also gives you access to thousands of open source libraries replacing a subset of functionality you otherwise require plugins for.
I expect your issue is in the ssh setup and not an issue with Xojo. Have you accepted the security key when during first use? I was stuck on that at one point.
I am also not convinced -tt is valid for ssh on windows, (I may be wrong but I have never used it).
Are your commands working directly in cmd or Powershell?
The error message I received is
ssh operating. The problem is that I can’t use
ssh specifically with Xojo’s Shell object. Attempting not to establish a pseudo-terminal makes it so Xojo receives no data /
DataAvailable event. Not passing the parameter nets me the error.
ssh works in cmd.exe.
Because xojo can not handle it. With the plug-in from Christian it works imediately
As a troubleshooting step, have you perhaps executed your scripts without using ssh (just direct to cmd or PS from Xojo)?
Can someone from the Xojo team comment?
@William_Yu @Paul_Lefebvre @Greg_O_Lone
Has anyone at Xojo ever been able to use Xojo, Shell, and SSH on Windows?
I’m trying to connect to a server via ssh and execute remote commands from within a Xojo app. I don’t understand how this would help?
Hmm… Maybe I misunderstood your question.
That’s ok, thanks for trying to help. I wanted to make sure I didn’t miss something.
I’m not sitting at my office computer now. But In the past I have made many applications using the SSH opensource putty. The plink for remote SSH applications. Tomorrow I can have a look and forward you some code. This was done with an older version of Xojo
Do you mean that you include putty utilities with your Xojo app and operate ssh through those?