Giving terminal inputwait for autossh connection to completeshell scripting remote commands through...
What city and town structures are important in a low fantasy medieval world?
If you attack a Tarrasque while swallowed, what AC do you need to beat to hit it?
Why does the U.S military use mercenaries?
Bash - Execute two commands and get exit status 1 if first fails
Does the Aboleth have expertise in history and perception?
Cycling to work - 30 mile return
Why are stats in Angband written as 18/** instead of 19, 20...?
Running server on home network with HTTPS
Hotel booking: Why is Agoda much cheaper than booking.com?
How do we explain the use of a software on a math paper?
Is the free group on two generators generated by two elements?
Was murdering a slave illegal in American slavery, and if so, what punishments were given for it?
Vehemently against code formatting
Why were early aviators' trousers flared at the thigh?
In Dutch history two people are referred to as "William III"; are there any more cases where this happens?
How can sister protect herself from impulse purchases with a credit card?
Germany rejected my entry to Schengen countries
How does the "reverse syntax" in Middle English work?
Was Tyrion always a poor strategist?
Bash Array of Word-Splitting Headaches
Is being an extrovert a necessary condition to be a manager?
Why should one apply for UK visa before other visas, on a multi-destination European holiday?
What is the backup for a glass cockpit, if a plane loses power to the displays/controls?
Very serious stuff - Salesforce bug enabled "Modify All"
Giving terminal input
wait for autossh connection to completeshell scripting remote commands through sshpredetermine script input textExport mysql to remote server using one SSH sessionBash script - Automatically enter user input (password of keystore)How to pass multiple arguments through ssh and use those arguments in the ssh script?password policy in linux won't allow me to reset a passwordHow to send keystrokes before interactive shell to automate Linux serial port login with GNU screen?send from variable in #!/usr/bin/expect -fsudo: pam_authenticate: Conversation error
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I am executing the following in my script:
ssh pi@192.169.1.89
Which asks me for a password
pi@192.169.1.89's password:
How do I execute the script to create the ssh connection and then pass the password into it, so I don't have to type it?
linux shell-script
New contributor
add a comment |
I am executing the following in my script:
ssh pi@192.169.1.89
Which asks me for a password
pi@192.169.1.89's password:
How do I execute the script to create the ssh connection and then pass the password into it, so I don't have to type it?
linux shell-script
New contributor
add a comment |
I am executing the following in my script:
ssh pi@192.169.1.89
Which asks me for a password
pi@192.169.1.89's password:
How do I execute the script to create the ssh connection and then pass the password into it, so I don't have to type it?
linux shell-script
New contributor
I am executing the following in my script:
ssh pi@192.169.1.89
Which asks me for a password
pi@192.169.1.89's password:
How do I execute the script to create the ssh connection and then pass the password into it, so I don't have to type it?
linux shell-script
linux shell-script
New contributor
New contributor
edited 1 min ago
user10204157
New contributor
asked 17 mins ago
user10204157user10204157
1
1
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
There are several ways to do this, but I recommend using public/private keys rather than passing the password (which is possible). There are many other answers on this - but here is a quick how to:
On the machine you are logging in from:
Create a public/private key combination:
ssh-keygen -t rsa
Copy the public key to the remote machine:
ssh-copy-id pi@192.168.1.89
You will then need to type your password, and the public key will be copied to 192.168.1.89. At this point you will no longer be asked for your password upon logging in from the first machine.
New contributor
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
});
}
});
user10204157 is a new contributor. Be nice, and check out our Code of Conduct.
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%2f519626%2fgiving-terminal-input%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
There are several ways to do this, but I recommend using public/private keys rather than passing the password (which is possible). There are many other answers on this - but here is a quick how to:
On the machine you are logging in from:
Create a public/private key combination:
ssh-keygen -t rsa
Copy the public key to the remote machine:
ssh-copy-id pi@192.168.1.89
You will then need to type your password, and the public key will be copied to 192.168.1.89. At this point you will no longer be asked for your password upon logging in from the first machine.
New contributor
add a comment |
There are several ways to do this, but I recommend using public/private keys rather than passing the password (which is possible). There are many other answers on this - but here is a quick how to:
On the machine you are logging in from:
Create a public/private key combination:
ssh-keygen -t rsa
Copy the public key to the remote machine:
ssh-copy-id pi@192.168.1.89
You will then need to type your password, and the public key will be copied to 192.168.1.89. At this point you will no longer be asked for your password upon logging in from the first machine.
New contributor
add a comment |
There are several ways to do this, but I recommend using public/private keys rather than passing the password (which is possible). There are many other answers on this - but here is a quick how to:
On the machine you are logging in from:
Create a public/private key combination:
ssh-keygen -t rsa
Copy the public key to the remote machine:
ssh-copy-id pi@192.168.1.89
You will then need to type your password, and the public key will be copied to 192.168.1.89. At this point you will no longer be asked for your password upon logging in from the first machine.
New contributor
There are several ways to do this, but I recommend using public/private keys rather than passing the password (which is possible). There are many other answers on this - but here is a quick how to:
On the machine you are logging in from:
Create a public/private key combination:
ssh-keygen -t rsa
Copy the public key to the remote machine:
ssh-copy-id pi@192.168.1.89
You will then need to type your password, and the public key will be copied to 192.168.1.89. At this point you will no longer be asked for your password upon logging in from the first machine.
New contributor
New contributor
answered 1 min ago
ScotScot
1011
1011
New contributor
New contributor
add a comment |
add a comment |
user10204157 is a new contributor. Be nice, and check out our Code of Conduct.
user10204157 is a new contributor. Be nice, and check out our Code of Conduct.
user10204157 is a new contributor. Be nice, and check out our Code of Conduct.
user10204157 is a new contributor. Be nice, and check out our Code of Conduct.
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.
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%2f519626%2fgiving-terminal-input%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