-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when building on windows #106
Comments
I found a way to do it without PTY ... func giveShell(s ssh.Session) {
strCommand := getOSCommand()
cmd := exec.Command(strCommand[0], strCommand[1:]...)
cmd.Stderr = s
cmd.Stdout = s
cmd.Stdin = s
cmd.Start()
cmd.Wait()
} |
I don't believe this is an issue with our code - the pty functions we provide are really a thin wrapper and don't actually call out to a pty library. As an example, we don't even use TIOCSWINSZ or the other syscalls mentioned in our code (aside from in an example). You pay need to find a different way of handling ptys if your code needs to work on Windows. Generally, when you're trying to build something in a cross platform way, you will have to avoid the syscall package as they are very platform specific. |
@SakiiR Did you ever find a solution here? If not hopefully creack/pty#109 may provide some limited Windows support. |
When building my ssh server on windows ... I get those errors:
I guess this is because I am using pty and stuff in my handler ...
Is there any way to do cross platform command execution ?
The text was updated successfully, but these errors were encountered: