is there a standard seperating character for commands in SSH protocols?












0















In command or RPC protocols that are written with SSH as the transport medium, is there a standard seperating character that the SSH server uses to parse commands?



For example, if we have a simple protocol defined between a client and a server, where the client will open an SSH connection to the server and then start sending bytes:



DO COMMAND <something> DO C0MMAND2



is there a standard <something>? Or does each protocol over SSH "do it's own thing".



As an example of a standard, "Null-terminated strings are a C construct used to determine the end of a sequence of characters intended to be used as a string.": https://stackoverflow.com/questions/34621006/how-can-a-file-contain-null-bytes



If there is not a standard, are there custom parsers that need to be written for SSH servers depending on the "message format"?



My high level question is whether SSH frameworks know how to "split messages" based on some standard, or whether each SSH server for a protocol is written with a custom listener and has to know when a "full" message is received, wait for the next separating character, etc.










share|improve this question




















  • 1





    Do you have an example of such protocol over SSH? Are you possibly referring to ssh connection multiplexing?

    – Stéphane Chazelas
    Feb 27 at 15:28











  • Is this question about SCP (and the SSH subsystem mechanism in general)?

    – Toby Speight
    Feb 28 at 18:36
















0















In command or RPC protocols that are written with SSH as the transport medium, is there a standard seperating character that the SSH server uses to parse commands?



For example, if we have a simple protocol defined between a client and a server, where the client will open an SSH connection to the server and then start sending bytes:



DO COMMAND <something> DO C0MMAND2



is there a standard <something>? Or does each protocol over SSH "do it's own thing".



As an example of a standard, "Null-terminated strings are a C construct used to determine the end of a sequence of characters intended to be used as a string.": https://stackoverflow.com/questions/34621006/how-can-a-file-contain-null-bytes



If there is not a standard, are there custom parsers that need to be written for SSH servers depending on the "message format"?



My high level question is whether SSH frameworks know how to "split messages" based on some standard, or whether each SSH server for a protocol is written with a custom listener and has to know when a "full" message is received, wait for the next separating character, etc.










share|improve this question




















  • 1





    Do you have an example of such protocol over SSH? Are you possibly referring to ssh connection multiplexing?

    – Stéphane Chazelas
    Feb 27 at 15:28











  • Is this question about SCP (and the SSH subsystem mechanism in general)?

    – Toby Speight
    Feb 28 at 18:36














0












0








0








In command or RPC protocols that are written with SSH as the transport medium, is there a standard seperating character that the SSH server uses to parse commands?



For example, if we have a simple protocol defined between a client and a server, where the client will open an SSH connection to the server and then start sending bytes:



DO COMMAND <something> DO C0MMAND2



is there a standard <something>? Or does each protocol over SSH "do it's own thing".



As an example of a standard, "Null-terminated strings are a C construct used to determine the end of a sequence of characters intended to be used as a string.": https://stackoverflow.com/questions/34621006/how-can-a-file-contain-null-bytes



If there is not a standard, are there custom parsers that need to be written for SSH servers depending on the "message format"?



My high level question is whether SSH frameworks know how to "split messages" based on some standard, or whether each SSH server for a protocol is written with a custom listener and has to know when a "full" message is received, wait for the next separating character, etc.










share|improve this question
















In command or RPC protocols that are written with SSH as the transport medium, is there a standard seperating character that the SSH server uses to parse commands?



For example, if we have a simple protocol defined between a client and a server, where the client will open an SSH connection to the server and then start sending bytes:



DO COMMAND <something> DO C0MMAND2



is there a standard <something>? Or does each protocol over SSH "do it's own thing".



As an example of a standard, "Null-terminated strings are a C construct used to determine the end of a sequence of characters intended to be used as a string.": https://stackoverflow.com/questions/34621006/how-can-a-file-contain-null-bytes



If there is not a standard, are there custom parsers that need to be written for SSH servers depending on the "message format"?



My high level question is whether SSH frameworks know how to "split messages" based on some standard, or whether each SSH server for a protocol is written with a custom listener and has to know when a "full" message is received, wait for the next separating character, etc.







ssh protocols






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 27 at 15:12







Tommy

















asked Feb 27 at 14:50









TommyTommy

1658




1658








  • 1





    Do you have an example of such protocol over SSH? Are you possibly referring to ssh connection multiplexing?

    – Stéphane Chazelas
    Feb 27 at 15:28











  • Is this question about SCP (and the SSH subsystem mechanism in general)?

    – Toby Speight
    Feb 28 at 18:36














  • 1





    Do you have an example of such protocol over SSH? Are you possibly referring to ssh connection multiplexing?

    – Stéphane Chazelas
    Feb 27 at 15:28











  • Is this question about SCP (and the SSH subsystem mechanism in general)?

    – Toby Speight
    Feb 28 at 18:36








1




1





Do you have an example of such protocol over SSH? Are you possibly referring to ssh connection multiplexing?

– Stéphane Chazelas
Feb 27 at 15:28





Do you have an example of such protocol over SSH? Are you possibly referring to ssh connection multiplexing?

– Stéphane Chazelas
Feb 27 at 15:28













Is this question about SCP (and the SSH subsystem mechanism in general)?

– Toby Speight
Feb 28 at 18:36





Is this question about SCP (and the SSH subsystem mechanism in general)?

– Toby Speight
Feb 28 at 18:36










1 Answer
1






active

oldest

votes


















1














Secure shell is a means to use just that: a shell. As such, the syntax for command separation via SSH is identical to command separation locally:



me@localworkstation:~
$ echo foo; whoami; hostname
foo
me
localworkstation
me@localworkstation:~
$ ssh myself@remote "echo foo; whoami; hostname"
foo
myself
remote





share|improve this answer
























  • programatically, what is the "control character" equivelent to a user pressing enter on the keyboard? Is it n? Meaning, if you were doing the same thing but from a programatic client, does inserting "n" trigger this same behavior?

    – Tommy
    Feb 28 at 15:43











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f503361%2fis-there-a-standard-seperating-character-for-commands-in-ssh-protocols%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Secure shell is a means to use just that: a shell. As such, the syntax for command separation via SSH is identical to command separation locally:



me@localworkstation:~
$ echo foo; whoami; hostname
foo
me
localworkstation
me@localworkstation:~
$ ssh myself@remote "echo foo; whoami; hostname"
foo
myself
remote





share|improve this answer
























  • programatically, what is the "control character" equivelent to a user pressing enter on the keyboard? Is it n? Meaning, if you were doing the same thing but from a programatic client, does inserting "n" trigger this same behavior?

    – Tommy
    Feb 28 at 15:43
















1














Secure shell is a means to use just that: a shell. As such, the syntax for command separation via SSH is identical to command separation locally:



me@localworkstation:~
$ echo foo; whoami; hostname
foo
me
localworkstation
me@localworkstation:~
$ ssh myself@remote "echo foo; whoami; hostname"
foo
myself
remote





share|improve this answer
























  • programatically, what is the "control character" equivelent to a user pressing enter on the keyboard? Is it n? Meaning, if you were doing the same thing but from a programatic client, does inserting "n" trigger this same behavior?

    – Tommy
    Feb 28 at 15:43














1












1








1







Secure shell is a means to use just that: a shell. As such, the syntax for command separation via SSH is identical to command separation locally:



me@localworkstation:~
$ echo foo; whoami; hostname
foo
me
localworkstation
me@localworkstation:~
$ ssh myself@remote "echo foo; whoami; hostname"
foo
myself
remote





share|improve this answer













Secure shell is a means to use just that: a shell. As such, the syntax for command separation via SSH is identical to command separation locally:



me@localworkstation:~
$ echo foo; whoami; hostname
foo
me
localworkstation
me@localworkstation:~
$ ssh myself@remote "echo foo; whoami; hostname"
foo
myself
remote






share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 27 at 15:29









DopeGhotiDopeGhoti

46.4k56190




46.4k56190













  • programatically, what is the "control character" equivelent to a user pressing enter on the keyboard? Is it n? Meaning, if you were doing the same thing but from a programatic client, does inserting "n" trigger this same behavior?

    – Tommy
    Feb 28 at 15:43



















  • programatically, what is the "control character" equivelent to a user pressing enter on the keyboard? Is it n? Meaning, if you were doing the same thing but from a programatic client, does inserting "n" trigger this same behavior?

    – Tommy
    Feb 28 at 15:43

















programatically, what is the "control character" equivelent to a user pressing enter on the keyboard? Is it n? Meaning, if you were doing the same thing but from a programatic client, does inserting "n" trigger this same behavior?

– Tommy
Feb 28 at 15:43





programatically, what is the "control character" equivelent to a user pressing enter on the keyboard? Is it n? Meaning, if you were doing the same thing but from a programatic client, does inserting "n" trigger this same behavior?

– Tommy
Feb 28 at 15:43


















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f503361%2fis-there-a-standard-seperating-character-for-commands-in-ssh-protocols%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to make a Squid Proxy server?

Is this a new Fibonacci Identity?

19世紀