ssh-copy-id public key denied











up vote
0
down vote

favorite












I'm trying to copy my public ssh key to my vps, so I can log in with ssh.



However, when I enter the command:



ssh-copy-id me@myserver


I get this error message



/usr/local/bin/ssh-copy-id: INFO: attempting to log in with the new    key(s), to filter out any that are already installed
/usr/local/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Permission denied (publickey).


Does anybody know how to fix this? I'm on a Mac.










share|improve this question
























  • see if you can log in manually and write to the file that it will be adding to, the authorized_keys file. ~/.ssh/authorized_keys If you can then the ssh-copy-id should work. If not then see what stage gives a problem The side you are logging into has to accept password login for you to get in. You can remove passwordlogin once ssh-copy-id has done its thing and enabled you to login via key. PasswordAuthentication yes (in sshd_config) file
    – barlop
    Mar 16 '15 at 10:28












  • thanks Jawa, that was indeed the solution. The issue I had, was that in the sshd_config file the PasswordAuthentication occured twice, and 'PasswordAuthentication yes' was overruled by 'PasswordAuthentication no'. I discovered this after three days of troubleshooting : )
    – Anthony Candaele
    Mar 18 '15 at 10:43















up vote
0
down vote

favorite












I'm trying to copy my public ssh key to my vps, so I can log in with ssh.



However, when I enter the command:



ssh-copy-id me@myserver


I get this error message



/usr/local/bin/ssh-copy-id: INFO: attempting to log in with the new    key(s), to filter out any that are already installed
/usr/local/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Permission denied (publickey).


Does anybody know how to fix this? I'm on a Mac.










share|improve this question
























  • see if you can log in manually and write to the file that it will be adding to, the authorized_keys file. ~/.ssh/authorized_keys If you can then the ssh-copy-id should work. If not then see what stage gives a problem The side you are logging into has to accept password login for you to get in. You can remove passwordlogin once ssh-copy-id has done its thing and enabled you to login via key. PasswordAuthentication yes (in sshd_config) file
    – barlop
    Mar 16 '15 at 10:28












  • thanks Jawa, that was indeed the solution. The issue I had, was that in the sshd_config file the PasswordAuthentication occured twice, and 'PasswordAuthentication yes' was overruled by 'PasswordAuthentication no'. I discovered this after three days of troubleshooting : )
    – Anthony Candaele
    Mar 18 '15 at 10:43













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm trying to copy my public ssh key to my vps, so I can log in with ssh.



However, when I enter the command:



ssh-copy-id me@myserver


I get this error message



/usr/local/bin/ssh-copy-id: INFO: attempting to log in with the new    key(s), to filter out any that are already installed
/usr/local/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Permission denied (publickey).


Does anybody know how to fix this? I'm on a Mac.










share|improve this question















I'm trying to copy my public ssh key to my vps, so I can log in with ssh.



However, when I enter the command:



ssh-copy-id me@myserver


I get this error message



/usr/local/bin/ssh-copy-id: INFO: attempting to log in with the new    key(s), to filter out any that are already installed
/usr/local/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
Permission denied (publickey).


Does anybody know how to fix this? I'm on a Mac.







ssh ssh-keys






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 16 '15 at 10:25









Jawa

3,15982435




3,15982435










asked Mar 16 '15 at 10:14









Anthony Candaele

111




111












  • see if you can log in manually and write to the file that it will be adding to, the authorized_keys file. ~/.ssh/authorized_keys If you can then the ssh-copy-id should work. If not then see what stage gives a problem The side you are logging into has to accept password login for you to get in. You can remove passwordlogin once ssh-copy-id has done its thing and enabled you to login via key. PasswordAuthentication yes (in sshd_config) file
    – barlop
    Mar 16 '15 at 10:28












  • thanks Jawa, that was indeed the solution. The issue I had, was that in the sshd_config file the PasswordAuthentication occured twice, and 'PasswordAuthentication yes' was overruled by 'PasswordAuthentication no'. I discovered this after three days of troubleshooting : )
    – Anthony Candaele
    Mar 18 '15 at 10:43


















  • see if you can log in manually and write to the file that it will be adding to, the authorized_keys file. ~/.ssh/authorized_keys If you can then the ssh-copy-id should work. If not then see what stage gives a problem The side you are logging into has to accept password login for you to get in. You can remove passwordlogin once ssh-copy-id has done its thing and enabled you to login via key. PasswordAuthentication yes (in sshd_config) file
    – barlop
    Mar 16 '15 at 10:28












  • thanks Jawa, that was indeed the solution. The issue I had, was that in the sshd_config file the PasswordAuthentication occured twice, and 'PasswordAuthentication yes' was overruled by 'PasswordAuthentication no'. I discovered this after three days of troubleshooting : )
    – Anthony Candaele
    Mar 18 '15 at 10:43
















see if you can log in manually and write to the file that it will be adding to, the authorized_keys file. ~/.ssh/authorized_keys If you can then the ssh-copy-id should work. If not then see what stage gives a problem The side you are logging into has to accept password login for you to get in. You can remove passwordlogin once ssh-copy-id has done its thing and enabled you to login via key. PasswordAuthentication yes (in sshd_config) file
– barlop
Mar 16 '15 at 10:28






see if you can log in manually and write to the file that it will be adding to, the authorized_keys file. ~/.ssh/authorized_keys If you can then the ssh-copy-id should work. If not then see what stage gives a problem The side you are logging into has to accept password login for you to get in. You can remove passwordlogin once ssh-copy-id has done its thing and enabled you to login via key. PasswordAuthentication yes (in sshd_config) file
– barlop
Mar 16 '15 at 10:28














thanks Jawa, that was indeed the solution. The issue I had, was that in the sshd_config file the PasswordAuthentication occured twice, and 'PasswordAuthentication yes' was overruled by 'PasswordAuthentication no'. I discovered this after three days of troubleshooting : )
– Anthony Candaele
Mar 18 '15 at 10:43




thanks Jawa, that was indeed the solution. The issue I had, was that in the sshd_config file the PasswordAuthentication occured twice, and 'PasswordAuthentication yes' was overruled by 'PasswordAuthentication no'. I discovered this after three days of troubleshooting : )
– Anthony Candaele
Mar 18 '15 at 10:43










1 Answer
1






active

oldest

votes

















up vote
0
down vote













I had the same problem, the way that worked for me was to put it mannually, in this link you can find how to do it Manually entry. In this way i was able to connect via ssh even when using pair keys. When i was configuring it, the .ssh/authorized_keys file contain another key pointing to the initial machine, so i override that information with the contained in the /.ssh/id_rsa.pub of the initial machine






share|improve this answer

















  • 1




    If you can Edit your answer with more details not just the link
    – Sam
    May 2 '17 at 9:02











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f890128%2fssh-copy-id-public-key-denied%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








up vote
0
down vote













I had the same problem, the way that worked for me was to put it mannually, in this link you can find how to do it Manually entry. In this way i was able to connect via ssh even when using pair keys. When i was configuring it, the .ssh/authorized_keys file contain another key pointing to the initial machine, so i override that information with the contained in the /.ssh/id_rsa.pub of the initial machine






share|improve this answer

















  • 1




    If you can Edit your answer with more details not just the link
    – Sam
    May 2 '17 at 9:02















up vote
0
down vote













I had the same problem, the way that worked for me was to put it mannually, in this link you can find how to do it Manually entry. In this way i was able to connect via ssh even when using pair keys. When i was configuring it, the .ssh/authorized_keys file contain another key pointing to the initial machine, so i override that information with the contained in the /.ssh/id_rsa.pub of the initial machine






share|improve this answer

















  • 1




    If you can Edit your answer with more details not just the link
    – Sam
    May 2 '17 at 9:02













up vote
0
down vote










up vote
0
down vote









I had the same problem, the way that worked for me was to put it mannually, in this link you can find how to do it Manually entry. In this way i was able to connect via ssh even when using pair keys. When i was configuring it, the .ssh/authorized_keys file contain another key pointing to the initial machine, so i override that information with the contained in the /.ssh/id_rsa.pub of the initial machine






share|improve this answer












I had the same problem, the way that worked for me was to put it mannually, in this link you can find how to do it Manually entry. In this way i was able to connect via ssh even when using pair keys. When i was configuring it, the .ssh/authorized_keys file contain another key pointing to the initial machine, so i override that information with the contained in the /.ssh/id_rsa.pub of the initial machine







share|improve this answer












share|improve this answer



share|improve this answer










answered May 2 '17 at 8:46









camilo040494

1




1








  • 1




    If you can Edit your answer with more details not just the link
    – Sam
    May 2 '17 at 9:02














  • 1




    If you can Edit your answer with more details not just the link
    – Sam
    May 2 '17 at 9:02








1




1




If you can Edit your answer with more details not just the link
– Sam
May 2 '17 at 9:02




If you can Edit your answer with more details not just the link
– Sam
May 2 '17 at 9:02


















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • 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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f890128%2fssh-copy-id-public-key-denied%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

AnyDesk - Fatal Program Failure

How to calibrate 16:9 built-in touch-screen to a 4:3 resolution?

QoS: MAC-Priority for clients behind a repeater