つぶねこ

@もじらもーど。
↑recent | ↓old | 20 index | 100 index | 300 index | 記事5件 | 記事10件 | 記事20件 |最新5件 |FAQ | カテゴリ一覧 | Index |
2001/11/23 6:30
出先の商用SSH2に自宅のOpenSSHから繋げる。

 要するに備忘録。そこら中に同じ情報は転がってるが(笑)
 自宅から学校に繋げるので、それぞれlocal , serverと呼ぶことにする。
 まずlocalのpublic/privateキーを作る。
  local:$ ssh-keygen -t dsa
 ~/.ssh/id_dsaと~/.ssh/id_dsa.pubができるので、privateキーを登録。
  local:$ echo "IdKey id_dsa" > ~/.ssh/identification
 さて、OpenSSHとSSH2はキーの形式が違ってたりするので変換する。
  local:$ ssh-keygen -x -f ~/.ssh/id_dsa > nekoneko.pub
 次に、この変換したpublicキーをserverに転送する。
  local:$ rsync -e ssh -a -v -c nekoneko.pub username@gandalf.lab.org:/home/username/.ssh2/
 むろん他の方法でもいいし、そもそもこれってばgandalfにアカウント持ってにゃいとできねー・・・
 ま、まぁともかく、転送できたら登録する。
  server:$ echo "Key nekoneko.pub" >> ~/.ssh2/authorization
 もちろん
  local:$ echo "Key nekoneko.pub" | ssh -l username gandalf.laborg 'cat >>~/.ssh/authorization'
 でもにゃんでもいい。
 これで公開鍵認証で接続できるはず。
 あとはいつも通り、
  local:$ eval `ssh-agent`
  local:$ ssh-add ~/.ssh/id_dsa
 にゃどとしておけば、パス入力無しに接続できるようににゃる。
 あ、そうそう、上で触ったファイルのパーミッションはちゃんとしておくこと。
 ちにゃみに、逆の接続、つまりgandalfから自宅、SSH2からOpenSSHに繋ぐときは、
  自宅:$ ssh-keygen -i -f id_dsa_1024_a.pub >> ~/.ssh/gandalf.pub
 で変換できる。まー、OpenSSHのssh-keygenがあればいいということ。



Index


2001/12/17 12:05 
2001/12/17 12:00 
2001/12/17 02:12 
2001/12/16 00:18 
2001/12/15 22:33 
2001/12/15 21:46 
2001/12/15 20:56 
2001/12/15 11:07 
2001/12/15 08:59 
2001/12/15 01:10 
2001/12/13 23:59 
2001/12/12 13:00 
2001/12/12 08:29 
2001/12/12 04:49 
2001/12/12 04:44 
2001/12/12 03:15 
2001/12/11 18:07 
2001/12/11 17:58 
2001/12/11 13:52 
2001/12/11 13:04 
2001/12/10 19:47 
2001/12/09 23:42 
2001/12/09 04:26 
2001/12/08 17:29 
2001/12/08 08:30 
2001/12/07 17:53 
2001/12/06 18:17 
2001/12/06 17:40 
2001/12/06 16:24 
2001/12/05 21:50 
2001/12/05 21:25 
2001/12/05 20:18 
2001/12/04 18:27 
2001/12/04 02:47 
2001/12/03 18:37 
2001/12/03 04:51 
2001/12/03 04:22 
2001/12/02 03:13 
2001/12/01 04:10 
2001/11/30 03:18 
2001/11/29 23:36 
2001/11/29 01:42 
2001/11/28 18:03 
2001/11/28 04:48 
2001/11/27 08:37 
2001/11/25 22:45 
2001/11/25 02:44 
2001/11/23 10:34 
2001/11/23 07:22 
2001/11/23 07:18 
2001/11/23 06:30 
2001/11/21 05:33 
2001/11/21 04:25 
2001/11/20 22:26 
2001/11/20 18:25 
2001/11/20 18:19 
2001/11/15 21:36 
2001/11/15 20:52 
2001/11/14 21:30 
2001/11/14 16:02 
2001/11/14 01:58 
2001/11/13 18:05 
2001/11/13 17:49 
2001/11/13 01:04 
2001/11/13 00:53 
2001/11/13 00:52 
2001/11/11 04:36 
2001/11/09 08:10 
2001/11/08 21:30 
2001/11/08 21:11 
2001/11/07 21:24 
2001/11/07 20:40 
2001/11/05 07:55 
2001/11/05 07:52 
2001/11/05 07:51 
2001/11/05 07:50 
2001/11/05 07:40 
2001/11/04 08:27 
2001/11/03 08:51 
2001/11/03 08:16 
2001/11/02 22:42 
2001/11/02 21:17 
2001/11/02 19:36 
2001/11/02 07:03 
2001/11/02 06:51 
2001/11/02 06:46 
2001/11/02 06:45 
2001/11/01 05:11 
2001/10/31 18:01 
2001/10/31 18:00 
2001/10/31 17:59 
2001/10/31 09:31 
2001/10/31 09:21 
2001/10/31 05:10 
2001/10/30 20:44 
2001/10/29 16:16 
2001/10/29 08:28 
2001/10/29 06:04 
2001/10/29 00:51 
2001/10/28 01:11 
2001/10/27 20:31 

↑recent | ↓old | 20 index | 100 index | 300 index | 記事5件 | 記事10件 | 記事20件 |最新5件 |FAQ | カテゴリ一覧 | Index |