openssh - execute cross-compiled binary on remote PC
up vote
0
down vote
favorite
I'm cross-compiling a C++ application and have written a one-liner that copies the file to the target PC after compilation. Now I would like to execute the binary using the remote PC resources. The problem is that the binary executes using local PC resources. No output is required to be sent back to compilation PC. I imagine the solution could be very simple but I can't see how to do it without using a complex tool such as vnc. Please can you suggest how I might go about accomplishing this as a one-liner?
sshpass -p "myPassword" scp /path/to/compiled/binary/on/host user@remotePC:/path/to/compiled/binary/on/target &&
sshpass -p "myPassword" ssh user@remotePC "path/to/compiled/binary/on/target"
remote-access openssh cross-compilation
add a comment |
up vote
0
down vote
favorite
I'm cross-compiling a C++ application and have written a one-liner that copies the file to the target PC after compilation. Now I would like to execute the binary using the remote PC resources. The problem is that the binary executes using local PC resources. No output is required to be sent back to compilation PC. I imagine the solution could be very simple but I can't see how to do it without using a complex tool such as vnc. Please can you suggest how I might go about accomplishing this as a one-liner?
sshpass -p "myPassword" scp /path/to/compiled/binary/on/host user@remotePC:/path/to/compiled/binary/on/target &&
sshpass -p "myPassword" ssh user@remotePC "path/to/compiled/binary/on/target"
remote-access openssh cross-compilation
How do you know that it executes on your local cumpoter?ssh user@host 'command'
will run the command on the remote system, redirecting output trough ssh.
– vidarlo
Dec 1 at 9:50
Interesting. The binaries in question are Nvidia DriveWorks applications that put a heavy load on the GPU. On the host machine I'm running a GTX 2080, and the target is a Tegra SOC. The latter is about three times slower. The difference in speed is evident when comparing local vs remote execution on the target system. It is impossible that the difference in execution speed is not due to the sample being run on the host hardware when executed remotely. I will run some more tests tomorrow and update the post.
– Harry Roache-Wilson
Dec 1 at 11:40
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm cross-compiling a C++ application and have written a one-liner that copies the file to the target PC after compilation. Now I would like to execute the binary using the remote PC resources. The problem is that the binary executes using local PC resources. No output is required to be sent back to compilation PC. I imagine the solution could be very simple but I can't see how to do it without using a complex tool such as vnc. Please can you suggest how I might go about accomplishing this as a one-liner?
sshpass -p "myPassword" scp /path/to/compiled/binary/on/host user@remotePC:/path/to/compiled/binary/on/target &&
sshpass -p "myPassword" ssh user@remotePC "path/to/compiled/binary/on/target"
remote-access openssh cross-compilation
I'm cross-compiling a C++ application and have written a one-liner that copies the file to the target PC after compilation. Now I would like to execute the binary using the remote PC resources. The problem is that the binary executes using local PC resources. No output is required to be sent back to compilation PC. I imagine the solution could be very simple but I can't see how to do it without using a complex tool such as vnc. Please can you suggest how I might go about accomplishing this as a one-liner?
sshpass -p "myPassword" scp /path/to/compiled/binary/on/host user@remotePC:/path/to/compiled/binary/on/target &&
sshpass -p "myPassword" ssh user@remotePC "path/to/compiled/binary/on/target"
remote-access openssh cross-compilation
remote-access openssh cross-compilation
edited Dec 1 at 6:59
asked Dec 1 at 0:57
Harry Roache-Wilson
11
11
How do you know that it executes on your local cumpoter?ssh user@host 'command'
will run the command on the remote system, redirecting output trough ssh.
– vidarlo
Dec 1 at 9:50
Interesting. The binaries in question are Nvidia DriveWorks applications that put a heavy load on the GPU. On the host machine I'm running a GTX 2080, and the target is a Tegra SOC. The latter is about three times slower. The difference in speed is evident when comparing local vs remote execution on the target system. It is impossible that the difference in execution speed is not due to the sample being run on the host hardware when executed remotely. I will run some more tests tomorrow and update the post.
– Harry Roache-Wilson
Dec 1 at 11:40
add a comment |
How do you know that it executes on your local cumpoter?ssh user@host 'command'
will run the command on the remote system, redirecting output trough ssh.
– vidarlo
Dec 1 at 9:50
Interesting. The binaries in question are Nvidia DriveWorks applications that put a heavy load on the GPU. On the host machine I'm running a GTX 2080, and the target is a Tegra SOC. The latter is about three times slower. The difference in speed is evident when comparing local vs remote execution on the target system. It is impossible that the difference in execution speed is not due to the sample being run on the host hardware when executed remotely. I will run some more tests tomorrow and update the post.
– Harry Roache-Wilson
Dec 1 at 11:40
How do you know that it executes on your local cumpoter?
ssh user@host 'command'
will run the command on the remote system, redirecting output trough ssh.– vidarlo
Dec 1 at 9:50
How do you know that it executes on your local cumpoter?
ssh user@host 'command'
will run the command on the remote system, redirecting output trough ssh.– vidarlo
Dec 1 at 9:50
Interesting. The binaries in question are Nvidia DriveWorks applications that put a heavy load on the GPU. On the host machine I'm running a GTX 2080, and the target is a Tegra SOC. The latter is about three times slower. The difference in speed is evident when comparing local vs remote execution on the target system. It is impossible that the difference in execution speed is not due to the sample being run on the host hardware when executed remotely. I will run some more tests tomorrow and update the post.
– Harry Roache-Wilson
Dec 1 at 11:40
Interesting. The binaries in question are Nvidia DriveWorks applications that put a heavy load on the GPU. On the host machine I'm running a GTX 2080, and the target is a Tegra SOC. The latter is about three times slower. The difference in speed is evident when comparing local vs remote execution on the target system. It is impossible that the difference in execution speed is not due to the sample being run on the host hardware when executed remotely. I will run some more tests tomorrow and update the post.
– Harry Roache-Wilson
Dec 1 at 11:40
add a comment |
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1097556%2fopenssh-execute-cross-compiled-binary-on-remote-pc%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Ask Ubuntu!
- 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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1097556%2fopenssh-execute-cross-compiled-binary-on-remote-pc%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
How do you know that it executes on your local cumpoter?
ssh user@host 'command'
will run the command on the remote system, redirecting output trough ssh.– vidarlo
Dec 1 at 9:50
Interesting. The binaries in question are Nvidia DriveWorks applications that put a heavy load on the GPU. On the host machine I'm running a GTX 2080, and the target is a Tegra SOC. The latter is about three times slower. The difference in speed is evident when comparing local vs remote execution on the target system. It is impossible that the difference in execution speed is not due to the sample being run on the host hardware when executed remotely. I will run some more tests tomorrow and update the post.
– Harry Roache-Wilson
Dec 1 at 11:40