#how to read from ssh session

40 messages · Page 1 of 1 (latest)

storm dagger
#

I don't understand, are you running ssh as an external command line? If so, ssh will run a command remotely and the standard input and output of the ssh command will be connected to the standard output and input of the remotely executed command.

rain sierra
#

To connect to my server

#

And I get those debug messages

#

And correctly see the output from my server

storm dagger
#

oh, I don't know that client, I can't help

rain sierra
#

The openssh

#

Command

#

Ssh

#

Any ssh client works for connecting tbh

#

I just wanna do it with golang

#

like the normal ssh command is what I used

#

I want an interactive session where I can read from stdout

#

I’m just running ssh user@myserver

#

not a single command

rain sierra
#

I just want to have a stdin and stdout I can write and read to

rain sierra
rain sierra
storm dagger
#

does go have a ssh client in the std lib? 😮

storm dagger
storm dagger
storm dagger
vapid edge
#

if you share a link to your code that may help as right now it's a bit nebulous what you're trying to do and what help you're seeking

rain sierra
#

When it works with the ssh executable I get that debug1 output

#

I’ll show code

storm dagger
#

it might be looking for the standard input to ask for the password and you didn't propagate it

storm dagger
storm dagger
rain sierra
#

btw I’m not home yet :/

#

so no code yet

storm dagger
#

then it might be you are actually reading from the ssh output

rain sierra
#

OMGGGGG

#

Solved

#

Ok so I needed to turn on the stdoutpipe before running shell

#

lol

storm dagger
#

oh, was I right? 😄