How to run tmux cmds in nodejs
Clash Royale CLAN TAG#URR8PPP
Is there any way to run tmux cmds like tmux kill-server, tmuxinator attach etc. through nodejs. I have searched online but not able to find anything useful which can aid me to remove my error.
I was trying this through shelljs npm module but it didn't work.
I am getting this error :-
Pseudo-terminal will not be allocated because stdin is not a terminal.
Permission denied (publickey).
when used these lines of code to run tmux cmds with nodejs :-
shell.exec('ssh -t myremotemachineaddress tmux kill-server');
shell.exec('ssh -t myremotemachineaddress tmuxinator start rails_servers');
Here, shell is a variable used for shelljs npm module.
shell ubuntu tmux node.js
add a comment |
Is there any way to run tmux cmds like tmux kill-server, tmuxinator attach etc. through nodejs. I have searched online but not able to find anything useful which can aid me to remove my error.
I was trying this through shelljs npm module but it didn't work.
I am getting this error :-
Pseudo-terminal will not be allocated because stdin is not a terminal.
Permission denied (publickey).
when used these lines of code to run tmux cmds with nodejs :-
shell.exec('ssh -t myremotemachineaddress tmux kill-server');
shell.exec('ssh -t myremotemachineaddress tmuxinator start rails_servers');
Here, shell is a variable used for shelljs npm module.
shell ubuntu tmux node.js
add a comment |
Is there any way to run tmux cmds like tmux kill-server, tmuxinator attach etc. through nodejs. I have searched online but not able to find anything useful which can aid me to remove my error.
I was trying this through shelljs npm module but it didn't work.
I am getting this error :-
Pseudo-terminal will not be allocated because stdin is not a terminal.
Permission denied (publickey).
when used these lines of code to run tmux cmds with nodejs :-
shell.exec('ssh -t myremotemachineaddress tmux kill-server');
shell.exec('ssh -t myremotemachineaddress tmuxinator start rails_servers');
Here, shell is a variable used for shelljs npm module.
shell ubuntu tmux node.js
Is there any way to run tmux cmds like tmux kill-server, tmuxinator attach etc. through nodejs. I have searched online but not able to find anything useful which can aid me to remove my error.
I was trying this through shelljs npm module but it didn't work.
I am getting this error :-
Pseudo-terminal will not be allocated because stdin is not a terminal.
Permission denied (publickey).
when used these lines of code to run tmux cmds with nodejs :-
shell.exec('ssh -t myremotemachineaddress tmux kill-server');
shell.exec('ssh -t myremotemachineaddress tmuxinator start rails_servers');
Here, shell is a variable used for shelljs npm module.
shell ubuntu tmux node.js
shell ubuntu tmux node.js
edited Dec 27 '18 at 17:58
Rui F Ribeiro
39.3k1479131
39.3k1479131
asked Dec 27 '18 at 11:48
Sahil AggarwalSahil Aggarwal
11
11
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
First of all, it looks like you didn't set up publickey authentification on the remote host. Without that, you won't be able to log in without a password.
You have to generate a key pair on your machine and add the public key in the ~/.ssh/authorized_keys
file in the user's directory.
To generate a key pair, use ssh_keygen
(pressing enter twice when asked for a password will create a key without a password).
ssh-keygen -t rsa -b 8192 -f ~/.ssh/id_yourmachine
ssh-add ~/.ssh/id_yourmachine
~/.ssh/id_yourmachine.pub
will be the public key, you should add to the file ~/.ssh/authorized_keys
on the remote host.
Then you can login with ssh user@yourmachine
.
Secondly, I'm not sure why you are using the -t
option, but it's probably not needed and seems to be causing the first warning.
Apart from that, node
has a built in way of executing commands/starting processes.
add a comment |
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
);
);
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%2funix.stackexchange.com%2fquestions%2f491111%2fhow-to-run-tmux-cmds-in-nodejs%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
First of all, it looks like you didn't set up publickey authentification on the remote host. Without that, you won't be able to log in without a password.
You have to generate a key pair on your machine and add the public key in the ~/.ssh/authorized_keys
file in the user's directory.
To generate a key pair, use ssh_keygen
(pressing enter twice when asked for a password will create a key without a password).
ssh-keygen -t rsa -b 8192 -f ~/.ssh/id_yourmachine
ssh-add ~/.ssh/id_yourmachine
~/.ssh/id_yourmachine.pub
will be the public key, you should add to the file ~/.ssh/authorized_keys
on the remote host.
Then you can login with ssh user@yourmachine
.
Secondly, I'm not sure why you are using the -t
option, but it's probably not needed and seems to be causing the first warning.
Apart from that, node
has a built in way of executing commands/starting processes.
add a comment |
First of all, it looks like you didn't set up publickey authentification on the remote host. Without that, you won't be able to log in without a password.
You have to generate a key pair on your machine and add the public key in the ~/.ssh/authorized_keys
file in the user's directory.
To generate a key pair, use ssh_keygen
(pressing enter twice when asked for a password will create a key without a password).
ssh-keygen -t rsa -b 8192 -f ~/.ssh/id_yourmachine
ssh-add ~/.ssh/id_yourmachine
~/.ssh/id_yourmachine.pub
will be the public key, you should add to the file ~/.ssh/authorized_keys
on the remote host.
Then you can login with ssh user@yourmachine
.
Secondly, I'm not sure why you are using the -t
option, but it's probably not needed and seems to be causing the first warning.
Apart from that, node
has a built in way of executing commands/starting processes.
add a comment |
First of all, it looks like you didn't set up publickey authentification on the remote host. Without that, you won't be able to log in without a password.
You have to generate a key pair on your machine and add the public key in the ~/.ssh/authorized_keys
file in the user's directory.
To generate a key pair, use ssh_keygen
(pressing enter twice when asked for a password will create a key without a password).
ssh-keygen -t rsa -b 8192 -f ~/.ssh/id_yourmachine
ssh-add ~/.ssh/id_yourmachine
~/.ssh/id_yourmachine.pub
will be the public key, you should add to the file ~/.ssh/authorized_keys
on the remote host.
Then you can login with ssh user@yourmachine
.
Secondly, I'm not sure why you are using the -t
option, but it's probably not needed and seems to be causing the first warning.
Apart from that, node
has a built in way of executing commands/starting processes.
First of all, it looks like you didn't set up publickey authentification on the remote host. Without that, you won't be able to log in without a password.
You have to generate a key pair on your machine and add the public key in the ~/.ssh/authorized_keys
file in the user's directory.
To generate a key pair, use ssh_keygen
(pressing enter twice when asked for a password will create a key without a password).
ssh-keygen -t rsa -b 8192 -f ~/.ssh/id_yourmachine
ssh-add ~/.ssh/id_yourmachine
~/.ssh/id_yourmachine.pub
will be the public key, you should add to the file ~/.ssh/authorized_keys
on the remote host.
Then you can login with ssh user@yourmachine
.
Secondly, I'm not sure why you are using the -t
option, but it's probably not needed and seems to be causing the first warning.
Apart from that, node
has a built in way of executing commands/starting processes.
answered Jan 5 at 11:35
rudibrudib
618517
618517
add a comment |
add a comment |
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.
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%2funix.stackexchange.com%2fquestions%2f491111%2fhow-to-run-tmux-cmds-in-nodejs%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