kippo導入のためのライブラリ
まずはkippoに必要なライブラリをインストール
yum install -y gcc python-devel python-setuptools
easy_install pip
pip install pyasn1 pycrypto
pip install twisted==15.2.0
SSHポート番号を変更
- ポート番号10022への許可
cp /usr/lib/firewalld/services/ssh.xml /etc/firewalld/service/ssh_2.xml
vi ssh_2.xml
<?xml version="1.0" encoding="utf-8"?>
<service>
<short>SSH</short>
<description>Secure Shell (SSH) is a protocol for logging into and executing commands on remote machines. It provides secure encrypted communications. If you plan on accessing your machine remotely via SSH over a firewalled interface, enable this option. You need the openssh-server package installed for this option to be useful.</description>
<port protocol="tcp" port="10022"/> ← ココを22から10022に変更
</service>
firewalld-cmd --reload
firewall-cmd --permanent --add-service=ssh_2
- SSHのポート変更
vi /etc/ssh/sshd_config
# Port 22
↓
Port 10022
SELinuxの変更
yum install policycoreutils-python
semanage port -a -t ssh_port_t -p tcp 10022
sshdの再起動
systemctl restart sshd
kippo用ユーザーを作成
useradd kippo
su kippo
cd
git clone https://github.com/desaster/kippo.git
cd kippo
cp kippo.cfg.dist kippo.cfg
起動する
./start.sh
22番ポートへのアクセスを10022番ポートへ
- これをkippo起動前に行うと,Teratermなどで設定している場合はTeratermが落ちます.
- もしかしたらSSHポート番号を変更して再起動した時点で落ちたかも
firewall-cmd --permanent --add-forward-port="port=22:proto=tcp:toport=2222"