Re: keepalive's in SSH-1 and when to stop reading data
- From: yawnmoth <terra1024@xxxxxxxxx>
- Date: 30 May 2007 05:12:51 -0700
On May 29, 5:18 pm, Simon Tatham <ana...@xxxxxxxxx> wrote:
yawnmoth <terra1...@xxxxxxxxx> wrote:According to the specs, "[SSH_SMSG_EXITSTATUS is] the last message
What would the protocol flag for such a keepalive be? SSH_MSG_IGNORE?
Yes.
Also, say I want to execute an 'ls' on the server. As far as I know,
the only way to do this is to request a pty and then to start a
shell. You then send the command 'ls' in, via stdin, and read the
output via stdout. A problem with this method, however, is that you
have no way of knowing when ls's output is done.
Yes, so don't do it like that. Instead of starting a shell using
SSH_CMSG_EXEC_SHELL, you use SSH_CMSG_EXEC_CMD and send "ls" as the
command string in that packet. Then you know when the output is done
because the server will close the data channel and also send you
SSH_SMSG_EXITSTATUS.
sent by the server". As such, I have to wonder... is it possible to
execute two commands like this? eg. can you get the output for an ls
and then for a pwd without having to wait, unsure of whether or not
you've reached the end?
.
- Follow-Ups:
- Re: keepalive's in SSH-1 and when to stop reading data
- From: Simon Tatham
- Re: keepalive's in SSH-1 and when to stop reading data
- References:
- keepalive's in SSH-1 and when to stop reading data
- From: yawnmoth
- Re: keepalive's in SSH-1 and when to stop reading data
- From: Simon Tatham
- keepalive's in SSH-1 and when to stop reading data
- Prev by Date: Re: keepalive's in SSH-1 and when to stop reading data
- Next by Date: Re: keepalive's in SSH-1 and when to stop reading data
- Previous by thread: Re: keepalive's in SSH-1 and when to stop reading data
- Next by thread: Re: keepalive's in SSH-1 and when to stop reading data
- Index(es):
Relevant Pages
|