public:win11_wsl2_ssh
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
public:win11_wsl2_ssh [2024/01/25 15:42] – [keychain] hirata.nanako | public:win11_wsl2_ssh [2024/03/18 11:13] (現在) – [鍵の登録] hirata.nanako | ||
---|---|---|---|
行 92: | 行 92: | ||
Enter file in which to save the key (/ | Enter file in which to save the key (/ | ||
Created directory '/ | Created directory '/ | ||
- | Enter passphrase (empty for no passphrase): | + | Enter passphrase (empty for no passphrase): |
- | Enter same passphrase again: | + | Enter same passphrase again: |
Your identification has been saved in / | Your identification has been saved in / | ||
Your public key has been saved in / | Your public key has been saved in / | ||
行 120: | 行 120: | ||
作成した鍵を ssh-agent に登録する. (# | 作成した鍵を ssh-agent に登録する. (# | ||
< | < | ||
- | username@localhost: | + | username@localhost: |
Agent pid 658 | Agent pid 658 | ||
- | username@localhost: | + | username@localhost: |
- | Enter passphrase for / | + | Enter passphrase for / |
Identity added: / | Identity added: / | ||
</ | </ | ||
行 132: | 行 132: | ||
</ | </ | ||
- | ==== keychain ==== | ||
- | 上記の方法のみではターミナルを再起動する度に鍵を ssh-agent に登録する必要がある. | ||
- | [[https:// | ||
- | |||
- | < | ||
- | username@localhost: | ||
- | </ | ||
- | |||
- | $HOME/ | ||
- | < | ||
- | / | ||
- | source $HOME/ | ||
- | </ | ||
- | |||
- | $HOME: ホームディレクトリ\\ | ||
- | $HOST: | ||
===== ssh 接続 ===== | ===== ssh 接続 ===== | ||
下記コマンドでssh接続する.\\ | 下記コマンドでssh接続する.\\ | ||
行 169: | 行 153: | ||
- | ===== ssh接続設定のファイル ===== | ||
- | 下記の設定をファイルに保存し ($HOME/ | ||
- | < | + | ===== メモ ===== |
- | Host 踏み台 | + | |
- | | + | |
- | ForwardX11 yes | + | |
- | ForwardX11Trusted yes | + | |
- | User 踏み台username | + | |
- | HostName 踏み台サーバ | + | |
- | </ | + | |
- | + | ||
- | 下記コマンドでssh接続できる. | + | |
- | < | + | |
- | username@localhost:~$ ssh 踏み台 | + | |
- | </ | + | |
---- | ---- | ||
* [[public: | * [[public: |
public/win11_wsl2_ssh.1706164957.txt.gz · 最終更新: 2024/01/25 15:42 by hirata.nanako