How do I set up my SSH keys so I can copy files from my local PC to a remote shared server?
I want to start using SSH instead of FTP, but I am clueless when it comes to SSH keys.
I'd like to use a Gulp command to transfer my files (as I do now with FTP). I've found a good amount of NPM packages that do this. However, none explain how to actually set up SSH keys on my remote shared (LAMP) server and on my local machine (MacOS).
Would anyone know how to set this up? All the tutorials I've found deal with setting up the node.js package, not the SSH keys themselves.
ftp ssh gulp
add a comment |
I want to start using SSH instead of FTP, but I am clueless when it comes to SSH keys.
I'd like to use a Gulp command to transfer my files (as I do now with FTP). I've found a good amount of NPM packages that do this. However, none explain how to actually set up SSH keys on my remote shared (LAMP) server and on my local machine (MacOS).
Would anyone know how to set this up? All the tutorials I've found deal with setting up the node.js package, not the SSH keys themselves.
ftp ssh gulp
add a comment |
I want to start using SSH instead of FTP, but I am clueless when it comes to SSH keys.
I'd like to use a Gulp command to transfer my files (as I do now with FTP). I've found a good amount of NPM packages that do this. However, none explain how to actually set up SSH keys on my remote shared (LAMP) server and on my local machine (MacOS).
Would anyone know how to set this up? All the tutorials I've found deal with setting up the node.js package, not the SSH keys themselves.
ftp ssh gulp
I want to start using SSH instead of FTP, but I am clueless when it comes to SSH keys.
I'd like to use a Gulp command to transfer my files (as I do now with FTP). I've found a good amount of NPM packages that do this. However, none explain how to actually set up SSH keys on my remote shared (LAMP) server and on my local machine (MacOS).
Would anyone know how to set this up? All the tutorials I've found deal with setting up the node.js package, not the SSH keys themselves.
ftp ssh gulp
ftp ssh gulp
edited 1 hour ago
Stephen Ostermiller♦
66.7k1391244
66.7k1391244
asked 1 hour ago
MeltingDog
66111428
66111428
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
- Perhaps, this article might interest you. However, before following this article, it would be nice to setup the SSH trust first.
- So, the problem statement is, you want to copy some files from your local machine to a remote server.
- To do that, you have to first chose an authentication method. Assuming the remote server is Linux, you've got two options - Password based and Password Less a.k.a SSH Key based authentication.
- For the remote server to authenticate you, these are the steps which need to happen
- You create an SSH keypair (Private Key + Public Key) on your local machine.
- You just copy/append the contents public key from your local machine to the .ssh/authorized_keys file of the remote server.
Now, when you will try to SSH to the remote server from your local machine, you will specify in the command that you are trying to authenticate with the private key file that you already have created in the first step and the authentication will be successful since you have imported the corresponding public key to the remote server's authorized_keys file.
First, lets create keypair:
ssh-keygen -t rsa
and then select all default options by just pressing Enter key.- In the output of the above command, you will see that the private and public key files will be generated e.g.:
Your identification has been saved in /home/ec2-user/.ssh/id_rsa
Your public key has been saved in /home/ec2-user/.ssh/id_rsa.pub
- Now, just copy/append the id_rsa.pub's CONTENT file from the directory mentioned in your case to the ~/.ssh/authorized_keys.
- To confirm that the SSH trust has been established, just try to SSH from your local machine to the remote server by using this command -
ssh -i /location/of/private/key username@remote_server_ip
- If everything's good and you are able to login, then you just have to follow the link I mentioned in the first line of this post.
New contributor
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "45"
};
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%2fwebmasters.stackexchange.com%2fquestions%2f119945%2fhow-do-i-set-up-my-ssh-keys-so-i-can-copy-files-from-my-local-pc-to-a-remote-sha%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
- Perhaps, this article might interest you. However, before following this article, it would be nice to setup the SSH trust first.
- So, the problem statement is, you want to copy some files from your local machine to a remote server.
- To do that, you have to first chose an authentication method. Assuming the remote server is Linux, you've got two options - Password based and Password Less a.k.a SSH Key based authentication.
- For the remote server to authenticate you, these are the steps which need to happen
- You create an SSH keypair (Private Key + Public Key) on your local machine.
- You just copy/append the contents public key from your local machine to the .ssh/authorized_keys file of the remote server.
Now, when you will try to SSH to the remote server from your local machine, you will specify in the command that you are trying to authenticate with the private key file that you already have created in the first step and the authentication will be successful since you have imported the corresponding public key to the remote server's authorized_keys file.
First, lets create keypair:
ssh-keygen -t rsa
and then select all default options by just pressing Enter key.- In the output of the above command, you will see that the private and public key files will be generated e.g.:
Your identification has been saved in /home/ec2-user/.ssh/id_rsa
Your public key has been saved in /home/ec2-user/.ssh/id_rsa.pub
- Now, just copy/append the id_rsa.pub's CONTENT file from the directory mentioned in your case to the ~/.ssh/authorized_keys.
- To confirm that the SSH trust has been established, just try to SSH from your local machine to the remote server by using this command -
ssh -i /location/of/private/key username@remote_server_ip
- If everything's good and you are able to login, then you just have to follow the link I mentioned in the first line of this post.
New contributor
add a comment |
- Perhaps, this article might interest you. However, before following this article, it would be nice to setup the SSH trust first.
- So, the problem statement is, you want to copy some files from your local machine to a remote server.
- To do that, you have to first chose an authentication method. Assuming the remote server is Linux, you've got two options - Password based and Password Less a.k.a SSH Key based authentication.
- For the remote server to authenticate you, these are the steps which need to happen
- You create an SSH keypair (Private Key + Public Key) on your local machine.
- You just copy/append the contents public key from your local machine to the .ssh/authorized_keys file of the remote server.
Now, when you will try to SSH to the remote server from your local machine, you will specify in the command that you are trying to authenticate with the private key file that you already have created in the first step and the authentication will be successful since you have imported the corresponding public key to the remote server's authorized_keys file.
First, lets create keypair:
ssh-keygen -t rsa
and then select all default options by just pressing Enter key.- In the output of the above command, you will see that the private and public key files will be generated e.g.:
Your identification has been saved in /home/ec2-user/.ssh/id_rsa
Your public key has been saved in /home/ec2-user/.ssh/id_rsa.pub
- Now, just copy/append the id_rsa.pub's CONTENT file from the directory mentioned in your case to the ~/.ssh/authorized_keys.
- To confirm that the SSH trust has been established, just try to SSH from your local machine to the remote server by using this command -
ssh -i /location/of/private/key username@remote_server_ip
- If everything's good and you are able to login, then you just have to follow the link I mentioned in the first line of this post.
New contributor
add a comment |
- Perhaps, this article might interest you. However, before following this article, it would be nice to setup the SSH trust first.
- So, the problem statement is, you want to copy some files from your local machine to a remote server.
- To do that, you have to first chose an authentication method. Assuming the remote server is Linux, you've got two options - Password based and Password Less a.k.a SSH Key based authentication.
- For the remote server to authenticate you, these are the steps which need to happen
- You create an SSH keypair (Private Key + Public Key) on your local machine.
- You just copy/append the contents public key from your local machine to the .ssh/authorized_keys file of the remote server.
Now, when you will try to SSH to the remote server from your local machine, you will specify in the command that you are trying to authenticate with the private key file that you already have created in the first step and the authentication will be successful since you have imported the corresponding public key to the remote server's authorized_keys file.
First, lets create keypair:
ssh-keygen -t rsa
and then select all default options by just pressing Enter key.- In the output of the above command, you will see that the private and public key files will be generated e.g.:
Your identification has been saved in /home/ec2-user/.ssh/id_rsa
Your public key has been saved in /home/ec2-user/.ssh/id_rsa.pub
- Now, just copy/append the id_rsa.pub's CONTENT file from the directory mentioned in your case to the ~/.ssh/authorized_keys.
- To confirm that the SSH trust has been established, just try to SSH from your local machine to the remote server by using this command -
ssh -i /location/of/private/key username@remote_server_ip
- If everything's good and you are able to login, then you just have to follow the link I mentioned in the first line of this post.
New contributor
- Perhaps, this article might interest you. However, before following this article, it would be nice to setup the SSH trust first.
- So, the problem statement is, you want to copy some files from your local machine to a remote server.
- To do that, you have to first chose an authentication method. Assuming the remote server is Linux, you've got two options - Password based and Password Less a.k.a SSH Key based authentication.
- For the remote server to authenticate you, these are the steps which need to happen
- You create an SSH keypair (Private Key + Public Key) on your local machine.
- You just copy/append the contents public key from your local machine to the .ssh/authorized_keys file of the remote server.
Now, when you will try to SSH to the remote server from your local machine, you will specify in the command that you are trying to authenticate with the private key file that you already have created in the first step and the authentication will be successful since you have imported the corresponding public key to the remote server's authorized_keys file.
First, lets create keypair:
ssh-keygen -t rsa
and then select all default options by just pressing Enter key.- In the output of the above command, you will see that the private and public key files will be generated e.g.:
Your identification has been saved in /home/ec2-user/.ssh/id_rsa
Your public key has been saved in /home/ec2-user/.ssh/id_rsa.pub
- Now, just copy/append the id_rsa.pub's CONTENT file from the directory mentioned in your case to the ~/.ssh/authorized_keys.
- To confirm that the SSH trust has been established, just try to SSH from your local machine to the remote server by using this command -
ssh -i /location/of/private/key username@remote_server_ip
- If everything's good and you are able to login, then you just have to follow the link I mentioned in the first line of this post.
New contributor
edited 1 hour ago
Stephen Ostermiller♦
66.7k1391244
66.7k1391244
New contributor
answered 1 hour ago
st_rt_dl_8
212
212
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Webmasters 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%2fwebmasters.stackexchange.com%2fquestions%2f119945%2fhow-do-i-set-up-my-ssh-keys-so-i-can-copy-files-from-my-local-pc-to-a-remote-sha%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