2004-11-24から1日間の記事一覧

ruby版

ssh

#!/usr/bin/ruby -Ke #鍵登録 `ssh-agent` =~ /SSH_AUTH_SOCK=([^;]+);.*SSH_AGENT_PID=([^;]+);/m ENV["SSH_AUTH_SOCK"],ENV["SSH_AGENT_PID"]=$1,$2 `ssh-add ~/.ssh/id_rsa` #Signal.trap(2){`ssh-agent -k`} #ruby1.7以上だったとほほ at_exit{`ssh-agen…

scpでパスフレーズを一度しか入れない方法

ssh

#!/bin/bash eval `ssh-agent ` ssh-add ~/.ssh/id_rsa scp filesv03:/etc/samba/smb.conf smb.conf.filesv03 scp filesv04:/etc/samba/smb.conf smb.conf.filesv04 eval `ssh-agent -k`

ssh-agent

ssh

下準備 $ ssh-keygen -t rsa $ chmod 755 ~/.ssh $ scp ~/.ssh/id_rsa.pub remote:.ssh/authorized_keyshttp://www.jp.freebsd.org/QandA/HTML/1578.html http://kotsuka.hp.infoseek.co.jp/security/

鍵の作成

ssh

n9d@apricot:~$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/n9d/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been sav…

もちょっと楽な設定

ssh

http://biz.letlive.jp/soho/linux/ssh-svr.html

利用者制限

ssh

http://www.zdnet.co.jp/help/tips/linux/l0315.html http://www.atmarkit.co.jp/flinux/rensai/linuxtips/447nonpassh.html

証明書認証のみにする

ssh

/etc/ssh/sshd_config ChallengeResponseAuthentication no PasswordAuthentication no