kippoBrinkerSumida.sh
1 |
#!/bin/bash |
---|---|
2 |
|
3 |
# kippoBrinkerSumida ver 0.2 |
4 |
# 2015/11/03 kanata |
5 |
|
6 |
KIPPO_PORT_LIST="1020 1021 1022 1023 1024 1025" # ダミーsshdのポートリスト |
7 |
SSH_VERSION_STRING="SSH-2.0-OpenSSH_6.6.1" |
8 |
COUNT="1" |
9 |
|
10 |
for KIPPO_PORT in ${KIPPO_PORT_LIST} |
11 |
do |
12 |
# configファイル生成 |
13 |
sed -e "s/ssh_version_string = SSH-2.0-OpenSSH_5.1p1 Debian-5/ssh_version_string = ${SSH_VERSION_STRING}/" kippo.cfg.dist |sed -e "s/ssh_port = 2222/ssh_port = ${KIPPO_PORT}/" > kippo.cfg |
14 |
# 起動 |
15 |
echo "kippo: dummy sshd port ${KIPPO_PORT}" |
16 |
|
17 |
COUNT_FORMAT=`printf %02d ${COUNT}` |
18 |
rm -f kippo_${COUNT_FORMAT}.pid |
19 |
twistd -y kippo.tac -l log/kippo.log --pidfile kippo_${COUNT_FORMAT}.pid |
20 |
COUNT=$(( COUNT + 1 )) |
21 |
done |
22 |
|
23 |
exit 0 |
24 |
|