SSH를 사용하여 연결할 수 있도록 원격 서버에서 로컬 컴퓨터로 개인 키를 올바르게 복사하는 방법

냉기

Linode 및 Siteground에 ssh연결, 암호 가있는 여러 원격 서버가 있습니다. Windows와 Putty를 사용하여 원격 서버에 연결했지만 지금은

나는 Ubuntu 18.04를 사용하기 시작했고 openssh-server를 설정했지만 이제 시도 할 때 ssh [email protected]오류 Permission Denied (Public key)가 표시되므로 추측하고 있습니다.

로컬 컴퓨터의 원격 서버에서 개인 키를 복사해야하는데 키를 정확히 어디에 배치해야하는지 그리고 연결할 수 있도록 추가하는 방법을 잘 모르겠습니다.

ctrl-alt-delor

First don't put your private key on the remote server. Any one compromising this server will have all access that you have.

Now that is out of the way. You have two options.

  1. Create a new private key on your new local machine. Then copy the public key (it comes with the private key, or can be generated from it). to the server. If goes in ~/.ssh/authorized_keys, one per line, so append it, don't overwrite the old one (or use ssh-copy-id).
  2. On the old local machine. Using putty, tell it to export your private-key in open-ssh format, then copy this to the new local machine (running openssh). It goes in directory ~/.ssh/ mine is in file id_rsa.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

Related 관련 기사

뜨겁다태그

보관