SAP*とDDICどっちが必要?

インフラ寄りのSAPのこととか

ICカードを利用したSSH接続の試みと失敗

会社のICカードWindows端末からSSHできることを目指したものの、結論から言うとできないことがわかった。

 

マイナンバーカードでSSHする - AAA Blog

どうやらOpenSCとやらを使うとICカードをいじれるようで、マイナカードでできるなら、SUICAや会社の社員証でもできるんじゃね?くらいの発想がスタート地点

結局、キーペア持ってるわけじゃないので、できるわけないよね(笑)

 

以下、備忘録

WindowsでOpenSCを使う(1.準備編) #NFC - Qiita

ダウンロード先をWikiからたどる必要がある

Home · OpenSC/OpenSC Wiki · GitHub

インストール先は

C:\Program Files\OpenSC Project\OpenSC\tools

opensc-toolのオプション一覧

C:\Program Files\OpenSC Project\OpenSC\tools>opensc-tool
Usage: opensc-tool [OPTIONS]
Options:
      --version                 Prints OpenSC package revision
  -i, --info                    Prints information about OpenSC
  -a, --atr                     Prints the ATR bytes of the card
      --serial                  Prints the card serial number
  -n, --name                    Identify the card and print its name
  -G, --get-conf-entry <arg>    Get configuration, e.g. section:name:key
  -S, --set-conf-entry <arg>    Set configuration, e.g. section:name:key:val
  -l, --list-readers            Lists readers
  -D, --list-drivers            Lists all installed card drivers
  -f, --list-files              Recursively lists files stored on card
  -s, --send-apdu <arg>         Sends an APDU (may need '-c default')
  -r, --reader <arg>            Uses reader number <arg> [0]
      --reset [arg]             Does card reset of type <cold|warm> [cold]
  -c, --card-driver <arg>       Forces a card driver (use '?' for list)
      --list-algorithms         Lists algorithms supported by card
  -w, --wait                    Wait for a card to be inserted
  -v, --verbose                 Verbose operation, may be used several times

 

C:\Program Files\OpenSC Project\OpenSC\tools>opensc-tool -a
Using reader with a card: Broadcom Corp Contacted SmartCard 0
Card not present.
Failed to connect to reader: Card not present

ICカードリーダーが複数ある場合(接触型と非接触型のハイブリットタイプ)はカードリーダを指定してあげる必要がある

C:\Program Files\OpenSC Project\OpenSC\tools>opensc-tool -l
# Detected readers (pcsc)
Nr.  Card  Features  Name
0    Yes             Broadcom Corp Contacted SmartCard 0
1    Yes             Broadcom Corp Contactless SmartCard 0

C:\Program Files\OpenSC Project\OpenSC\tools>opensc-tool -a -r 1
3b:8f:80:01:80:4f:0c:a0:00:00:03:06:00:00:00:00:00:00:00:68