0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

WindowsからLinuxへSSH公開鍵認証する

Posted at

はじめに

SSHサーバー : Linux Mint
SSHクライアント : Windows 10

こんなかんじ

SSH鍵登録の仕方

cmdではなくPowershellでおこなうこと

キーペアの作成

ssh-keygen -t rsa -b 4096

キーをSSHサーバー(接続先)へ送る

PS C:\Windows\system32> cat ~/.ssh/id_rsa.pub | ssh USER@192.168.1.1 -p 1024 " mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys "

USER@192.168.1.1 は環境に合わせて,ユーザー名とホスト名書き換え
ポート番号変えている人は -pオプションでポート指定(例は1024)

ログインしてみる

ssh USER@192.168.1.1 -p 1024

パスワードが求められることなくログインできるはずである

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?