sshbbsd-howto
//要装 ssh-1.2.xx 软件,挺奇怪的,为什么放着好好的openssh不用呢?
//看了下源代码,sshbbsd 就是一个sshd ,外国人写的
/*
This program is the ssh daemon. It listens for connections from clients, and
performs authentication, executes use commands or shell, and forwards
information to/from the application to the user client over an encrypted
connection. This can also handle forwarding of X11, TCP/IP, and authentication
agent connections.
*/
//可能是因为它用的是 ssh-1.2. 的架构吧.所以要先安装 ssh-1.2 ,再盗取ssh-1.2的配置
//文件,用ssh-keygen1 生成密钥文件等.
//那我们不妨这样:先在 FreeBSD 下安装 ssh-1.2 (因为 FreeBSD 下有port 安装方便)
//再取得它的配置文件 sshd-config ,并用 ssh-keygen1 生成所需的文件.然后移到138上
//使用.
0. ChangeLog
2002.9.15
flyriver v1.0
如果想加上 ssh 支持, 在 ./configure 时加上 –enable-ssh 参数, 不过必须有
sshbbsd 的源代码存在.
编译安装完 sshbbsd 之后,需要设置好配置文件和密钥才能使它正常工作。方法
如下:
1. 安装 ssh.com 发布的 ssh-1.2.xx 软件。
推荐使用 ssh-1.2.33。使用 FreeBSD 的用户,可以直接用 ports 方式安装。
2. 设置配置文件,生成密钥。
在安装好的 ssh-1.2.33 中可以找到它自带的配置文件。比如用 FreeBSD 的 ports
方式安装,那么自带的配置文件就是 /usr/local/etc/sshd_config。把这个文件复
制到 $(BBSHOME)/etc 目录中,根据自己的需要调整一下里面的参数。
用 bbs 用户登录到系统中(或者通过 su – bbs 方式),然后执行 ssh-keygen1 生
成密钥文件和随机数种子文件。需要注意的是,这个 ssh-keygen1 必须是
ssh-1.2.33 带的。ssh-keygen1 执行时会提示输入 passphrase,此时直接敲入回
车即可,也就是空的 passphrase。因为在这里我们是为了生成 hostkey,具体的
信息可以通过 man ssh-keygen1 得到。
默认情况下,ssh-keygen1 生成的文件在 $(BBSHOME)/.ssh 中,名字分别是
identity, identity.pub 和 random_seed。把这三个文件移到 $(BBSHOME)/etc
中,然后修改 $(BBSHOME)/etc/sshd_config 文件,把 HostKey 和 RandomSeed
参数分别调整为:
HostKey etc/identity
RandomSeed etc/random_seed
现在准备工作都已经做完了,到 $(BBSHOME)/bin 里面执行 sshbbsd 即可。需要
说明的是,如果想让 sshbbsd 的端口为默认 22 的话,需要用 root 用户来执行。
sshbbsd 在完成必要的初始化工作之后,会切换至 bbs 用户。另外如果系统原来有
ssh 服务而且端口也是 22 的话,必须把 22 改成其他数值。