Vine3 hacks

/

SourceForge.jp用sshカギの作成

Vine Evo / Vine3 hacks / SourceForge.jp用sshカギの作成

SourceForge.jpに接続するためにsshカギを作成する方法


1. Sourceforge.jpについて

1.1 Sourceforge.jpとは

Sourceforge.jpは、日本向けのオープンソース開発ポータルです。
ユーザー登録することでSourceforge.jp上の様々な開発プロジェクトに参加することができます。また、自分自身が新しいプロジェクトを登録することもできます。

僕自身は、aglibというPHP用のライブラリ作成プロジェクトを登録しています。

1.2 Sourceforge.jpとssh

Sourceforge.jpではsshを使っています。
サーバーにログインしたり、CVSでソースを登録するときはsshを通して接続します。そのため、sshを使うためにSourceforge.jpにカギを登録する必要があります。

2. カギの作成と登録

2.1 カギの作成(Linux)

ここではLinuxサーバ上でsshのかぎを作成する方法を説明します。
なぜLinuxサーバ上でカギを作成するかというと、phpDocを自動Uploadするためです。自動Uploadについては別のページで説明します。

以下の手順で、sshカギを作成します。

  1. ssh用キー作成コマンドを実行します。
    [atsushifx@agartha tmp]$ ssh-keygen -b 2048 -C atsushifx@aglabo.com -f identity -t rsa
  2. パスフレーズを聞いてきますので、パスフレーズを入力します。
    Generating public/private rsa key pair.
    Enter passphrase (empty for no passphrase): ********
    Enter same passphrase again: ********
  3. カレントディレクトリ上のファイルidentity,identity.pubを.sshディレクトリに移動します。
    [atsushifx@agartha tmp]$ cp identity* ~/.ssh/

以上でカギの作成は終了です。

2.2 カギの登録

作成したカギをSourceforge.jpに登録します。
以下の手順でカギを登録します。

  1. Sourceforge.jpにアクセスします。
    [Sourceforge.jp]
  2. ログインします。マイ・ページが表示されます。
    [マイ・ページ]
  3. アカウント管理をクリックし、[鍵の編集]をクリックします。
    CVS/SSHで共有する公開鍵の画面が表示されます。
    [CVS/SSHで共有する公開鍵]
  4. テキストボックス内に先ほど作成したファイル"identity.pub"の内容をはりつけます。
    [公開鍵の貼り付け]
  5. 更新をクリックし、鍵の内容を反映させます。
    [アカウント管理]

以上でカギの登録は終了です。

2.3 ログインチェック

キーが正常に動作するかチェックするためにsshでSourceforge.jpにログインします。
以下の手順でSourceforge.jpにログインします。

  1. 以下のようにしてsshを起動します。
    [atsushifx@agartha tmp]$ ssh -l atsushifx shell.sourceforge.jp
  2. 以下の表示が出ますので、yesと入力します。
    hostが登録されます。
    The authenticity of host 'shell.sourceforge.jp (61.215.208.26)' can't be established.
    RSA key fingerprint is 15:22:46:69:9f:ac:14:68:8a:be:f1:e4:29:7c:a9:51.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'shell.sourceforge.jp,61.215.208.26' (RSA) to the list of known hosts.
  3. パスフレーズ入力プロンプトが表示されます。
    パスフレーズを入力し、Enterを押します。
    Enter passphrase for key '/home/atsushifx/.ssh/identity': ********
  4. Sourceforge.jpにログインします。 Linux sf-usr-shell 2.4.27-vaj #1 SMP 2004年 8月 10日 火曜日 18:03:58 JST i686 unknown

    Most of the programs included with the Debian GNU/Linux system are
    freely redistributable; 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.
    atsushifx@sf-usr-shell:~$

上記のようにshellにログインできればカギは正常に登録されています。

A8.Net

Google ADSENSE


Revision: $Revision: 2 $
Last Update: $Date: 2007-02-28 23:35:40 +0900 (豌エ, 28 2譛 2007) $