ssh
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
* [[ssh]]
SSHを使うことにより、暗号化通信、サーバ認証、通信パケット...
#contents
** インストール
ftp://ftp.kddlabs.co.jp/OpenBSD/OpenSSH/portable/からOpen...
http://www.openssl.org/source/からOpenSSLをダウンロードし...
wget http://www.openssl.org/source/openssl-0.9.7g.tar.gz
tar xzvf openssl-0.9.7g.tar.gz
cd openssl-0.9.7g
./config --prefix=/usr/local
make
make install
ではzlibは[[PHP]]の時にいれたので、Tcp Wrappersをインスト...
http://ftp.porcupine.org/pub/security/index.htmlからダウ...
wget http://ftp.porcupine.org/pub/security/tcp_wrappers_...
cd tcp_wrappers_7.6
ではMakefileを編集します。
REAL_DAEMON_DIR = /usr/sbin <-/etc/inetd.confを開いてtel...
FACILITY = LOG_DAEMON <-LOG_MAILから変更
DOT= -DAPPEND_DOT <-コメントを取る。Reduce DNS load DNS...
AUTH = -DALWAYS_RFC931 <-コメントを取る。Always attempt ...
ACCESS = -DHOSTS_ACCESS <- Turning off access control
では編集後、
make linux
エラーが...
percent_m.c:17: conflicting types for `sys_errlist'
ではMakefileの148行目の
NETGROUP= TLI= EXTRA_CFLAGS="-DBROKEN_SO_LINGER" all
を
NETGROUP= TLI= EXTRA_CFLAGS="-DBROKEN_SO_LINGER -DSYS_ER...
に修正して、再度make linux。ではインストール
cp tcpd tcpdchk tcpdmatch safe_finger try-from /usr/sbin/
cp *.3 /usr/share/man/man3
cp *.5 /usr/share/man/man5
cp *.8 /usr/share/man/man8
cp tcpd.h /usr/include/
cp libwrap.a /usr/lib/
cd /usr/sbin
chown root tcpd tcpdchk tcpdmatch safe_finger try-from
chgrp root tcpd tcpdchk tcpdmatch safe_finger try-from
chmod 700 tcpd
chmod 711 tcpdchk tcpdmatch safe_finger try-from
ではOpenSSHのインストール
tar xzvf openssh-3.9p1.tar.gz
cd openssh-3.9p1
README.privsepより
mkdir /var/empty
chown root:sys /var/empty
chmod 755 /var/empty
groupadd sshd
useradd -g sshd -c 'sshd privsep' -d /var/empty -s /bin/...
これをしておかないと インストール時にPrivilege separation...
./configure --with-pam --with-tcp-wrappers --with-ipv4-d...
うっ..またエラーが...
PAM headers not found
どうもpam-develがないからだそうです。ではrpmかapt-get,dse...
make
make install
** 環境設定
OpenSSHがインストールされていたので、/etc/ssh/sshd_config...
-Protocol 2,1 ssh2を優先します。ssh2のみの場合はProtocol...
-PasswordAuthentication no パスワード認証を無効
-PermitEmptyPasswords no パスワードなしでのログインを禁止
-PermitRootLogin no rootでのログインを禁止
-AuthorizedKeysFile .ssh/authorized_keys 公開鍵のファ...
***SSH1
SSH1は公開鍵暗号にRSAを使用しています。ユーザ用のキーを作...
ssh-keygen -t rsa1
とすると、その指定された中に(デフォルトは /home/user名/....
cat identity.pub >> authorized_keys
rm identity.pub
chmod 600 authorized_keys
としておきます。これで公開鍵ができあがりです。ここででき...
***SSH2
SSH2は公開鍵暗号にDSAを使用しています。そのユーザになって
ssh-keygen -b 1024 -t dsa
すると
Enter file in which to save the key (/home/hoge/.ssh/id_...
Enter passphrase (empty for no passphrase): <-パスワード
Enter same passphrase again: <-もう一度パスワード
Your identification has been saved in /home/hoge/.ssh/id...
Your public key has been saved in /home/hoge/.ssh/id_dsa...
と表示されます。
cd .ssh
としますと、id_dsaとid_dsa.pubの2つのファイルができていま...
cat id_dsa.pub >> authorized_keys
rm id_dsa.pub
chmod 600 authorized_keys
ここでできたid_dsaをログイン時に使用してください。
** TIPS
***Authentication refused: bad ownership or modes for dir...
/home/hogehogeのアクセス権を確認しましょう。700とか755に...
***接続の確認
/var/log/secure
** リンク
http://www.net-newbie.com/putty.html~
http://www.atmarkit.co.jp/flinux/rensai/linuxtips/432make...
http://home.opaopa.org/solaris9/ssh.html~
http://www.unixuser.org/~euske/doc/openssh/jman/ssh-keyge...
http://www.ipa.go.jp/security/awareness/administrator/sec...
http://lightly.plala.jp/memo/install.html#tcp_wrappers~
http://www.edu.ics.saitama-u.ac.jp/~nagumo/tcpwrapper/~
http://www.ryouto.jp/linux/linux_45.html~
http://www.tcn.zaq.ne.jp/gara_k/pc_unix/pc_unix_019.htm~
** 参考書籍
終了行:
* [[ssh]]
SSHを使うことにより、暗号化通信、サーバ認証、通信パケット...
#contents
** インストール
ftp://ftp.kddlabs.co.jp/OpenBSD/OpenSSH/portable/からOpen...
http://www.openssl.org/source/からOpenSSLをダウンロードし...
wget http://www.openssl.org/source/openssl-0.9.7g.tar.gz
tar xzvf openssl-0.9.7g.tar.gz
cd openssl-0.9.7g
./config --prefix=/usr/local
make
make install
ではzlibは[[PHP]]の時にいれたので、Tcp Wrappersをインスト...
http://ftp.porcupine.org/pub/security/index.htmlからダウ...
wget http://ftp.porcupine.org/pub/security/tcp_wrappers_...
cd tcp_wrappers_7.6
ではMakefileを編集します。
REAL_DAEMON_DIR = /usr/sbin <-/etc/inetd.confを開いてtel...
FACILITY = LOG_DAEMON <-LOG_MAILから変更
DOT= -DAPPEND_DOT <-コメントを取る。Reduce DNS load DNS...
AUTH = -DALWAYS_RFC931 <-コメントを取る。Always attempt ...
ACCESS = -DHOSTS_ACCESS <- Turning off access control
では編集後、
make linux
エラーが...
percent_m.c:17: conflicting types for `sys_errlist'
ではMakefileの148行目の
NETGROUP= TLI= EXTRA_CFLAGS="-DBROKEN_SO_LINGER" all
を
NETGROUP= TLI= EXTRA_CFLAGS="-DBROKEN_SO_LINGER -DSYS_ER...
に修正して、再度make linux。ではインストール
cp tcpd tcpdchk tcpdmatch safe_finger try-from /usr/sbin/
cp *.3 /usr/share/man/man3
cp *.5 /usr/share/man/man5
cp *.8 /usr/share/man/man8
cp tcpd.h /usr/include/
cp libwrap.a /usr/lib/
cd /usr/sbin
chown root tcpd tcpdchk tcpdmatch safe_finger try-from
chgrp root tcpd tcpdchk tcpdmatch safe_finger try-from
chmod 700 tcpd
chmod 711 tcpdchk tcpdmatch safe_finger try-from
ではOpenSSHのインストール
tar xzvf openssh-3.9p1.tar.gz
cd openssh-3.9p1
README.privsepより
mkdir /var/empty
chown root:sys /var/empty
chmod 755 /var/empty
groupadd sshd
useradd -g sshd -c 'sshd privsep' -d /var/empty -s /bin/...
これをしておかないと インストール時にPrivilege separation...
./configure --with-pam --with-tcp-wrappers --with-ipv4-d...
うっ..またエラーが...
PAM headers not found
どうもpam-develがないからだそうです。ではrpmかapt-get,dse...
make
make install
** 環境設定
OpenSSHがインストールされていたので、/etc/ssh/sshd_config...
-Protocol 2,1 ssh2を優先します。ssh2のみの場合はProtocol...
-PasswordAuthentication no パスワード認証を無効
-PermitEmptyPasswords no パスワードなしでのログインを禁止
-PermitRootLogin no rootでのログインを禁止
-AuthorizedKeysFile .ssh/authorized_keys 公開鍵のファ...
***SSH1
SSH1は公開鍵暗号にRSAを使用しています。ユーザ用のキーを作...
ssh-keygen -t rsa1
とすると、その指定された中に(デフォルトは /home/user名/....
cat identity.pub >> authorized_keys
rm identity.pub
chmod 600 authorized_keys
としておきます。これで公開鍵ができあがりです。ここででき...
***SSH2
SSH2は公開鍵暗号にDSAを使用しています。そのユーザになって
ssh-keygen -b 1024 -t dsa
すると
Enter file in which to save the key (/home/hoge/.ssh/id_...
Enter passphrase (empty for no passphrase): <-パスワード
Enter same passphrase again: <-もう一度パスワード
Your identification has been saved in /home/hoge/.ssh/id...
Your public key has been saved in /home/hoge/.ssh/id_dsa...
と表示されます。
cd .ssh
としますと、id_dsaとid_dsa.pubの2つのファイルができていま...
cat id_dsa.pub >> authorized_keys
rm id_dsa.pub
chmod 600 authorized_keys
ここでできたid_dsaをログイン時に使用してください。
** TIPS
***Authentication refused: bad ownership or modes for dir...
/home/hogehogeのアクセス権を確認しましょう。700とか755に...
***接続の確認
/var/log/secure
** リンク
http://www.net-newbie.com/putty.html~
http://www.atmarkit.co.jp/flinux/rensai/linuxtips/432make...
http://home.opaopa.org/solaris9/ssh.html~
http://www.unixuser.org/~euske/doc/openssh/jman/ssh-keyge...
http://www.ipa.go.jp/security/awareness/administrator/sec...
http://lightly.plala.jp/memo/install.html#tcp_wrappers~
http://www.edu.ics.saitama-u.ac.jp/~nagumo/tcpwrapper/~
http://www.ryouto.jp/linux/linux_45.html~
http://www.tcn.zaq.ne.jp/gara_k/pc_unix/pc_unix_019.htm~
** 参考書籍
ページ名: