0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

OpenSSHバージョンアップ

Last updated at Posted at 2014-10-07

###Centos6でOpenSSH5.8をアップデート
OpenSSHの旧バージョンのを削除

yum remove openssh

openssh5.8ダウンロード

cd /usr/local/src/
wget http://ftp.jaist.ac.jp/pub/OpenBSD/OpenSSH/portable/openssh-5.8p2.tar.gz
tar zxvf openssh-5.8p2.tar.gz

specファイルとやらを編集

vi openssh-5.8p2/contrib/redhat/openssh.spec

openssh.spec
%define no_x11_askpass 0

%define no_x11_askpass 1 /* x11_askpassの無効化 */

%define no_gnome_askpass 0

%define no_gnome_askpass 1 /* gnome_askpassの無効化 */

%configure \
    --without-zlib-version-check \ /* 追加(zlibのバージョンチェック無効化) */
    --sysconfdir=%{_sysconfdir}/ssh \

RedHat以外のディストリビューション用のディレクトリを削除

cd openssh-5.8p2/contrib/
rm -Rf aix/ hpux/ caldera/ suse/ cygwin/ solaris/

openssh-5.8p2.tar.gzにアーカイブ

mv openssh-5.8p2.tar.gz openssh-5.8p2.tar.gz.org
tar czvf openssh-5.8p2.tar.gz openssh-5.8p2/

RPMパッケージを作成

rpmbuild -tb --clean openssh-5.8p2.tar.gz

作成したRPMパッケージからopensshをインストール

rpm -Uvh ~/rpmbuild/RPMS/x86_64/openssh-5.8p2-1.x86_64.rpm
rpm -Uvh ~/rpmbuild/RPMS/x86_64/openssh-server-5.8p2-1.x86_64.rpm
rpm -Uvh ~/rpmbuild/RPMS/x86_64/openssh-clients-5.8p2-1.x86_64.rpm

(環境によって”x86_64″の部分は”i386″などに変更が必要かもです)

sshdを自動起動するよう設定

chkconfig sshd on

yumの処理対象からopensshパッケージを除外する

echo exclude=openssh* >> /etc/yum.conf

sshd起動

/etc/init.d/sshd start

プラグインインストール

  • openssl-devel
  • tcp_wrappers-devel(tcp_wrappers)
  • pam-devel
  • wget
  • lsof

####参考

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?