服务器redhat9.0 客户端:win7
1、下载相关工具,openssh 安装包5.0 地址 www.openssh.com 左侧linux 进入页面后 download
下载putty windows下连接工具 ,puttygen 密匙转换工具
2、安装,下载的.tar.zip格式的安装包,./configure make make install make clean putty 无需安装
启动 service sshd start
设置开机启动 chkconfig - - 345 sshd on //345是runlevel
3、生成密匙,公匙 如果想使abc这个linux用户能够远程登陆的话,在linux服务器上输入如下命令
# su abc
% sshd-keygen -t rsa //注意,shhd-keygen 连在一起写
linux会让你填写生成密匙的放置位置,默认为/home/abc/.ssh/ .ssh为隐藏文件夹,用ls -a 可见
输入密匙口令
这样就在/home/abc/.ssh 目录下 生成了 id_rsa 的密匙和 id_rsa.pub 的公匙
% cat id_rsa.pub >> authoried_keys
% rm -f id_rsa.pub
% chmod 400 authoried_keys
4、配置.ssh 文件 /etc/ssh/sshd_config /etc/hosts.deny