【GCP】無料でGCEのVMインスタンスを作成する ・【Windows】SSH認証鍵作成 $ cd C:\Users\sample\.ssh\ -Cオプションでユーザネームを指定できる。パスワードを尋ねられるので2回入力。 $ C:\Users\sample\.ssh> ssh-keygen -t rsa -f my-ssh-key -C sample_user Generating public/private rsa key pair. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in my-ssh-key. Your public key has been saved in my-ssh-key.pub. 表示された公開鍵をコピー $ cat my-ssh-key.pub 先ほどのパスワードを入力し、接続完了 $ ssh sample_user@<指定IPアドレス> -i ~/.ssh/my-ssh-key Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '指定IPアドレス' (ECDSA) to the list of known hosts. Enter passphrase for key 'C:\Users\sackle/.ssh/my-ssh-key': Linux sample-webserver 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u5 (2019-08-11) x86_64 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed Aug 21 08:07:45 2019 from 203.152.218.33 sample_user@sample-webserver:~$