一、windows下安装好secureCRT6.2二、root用户登入linux服务器增加用户:useradd -m username设置密码:passwd username将username加入root,wheel组:gpasswd -a username root gpasswd -a username wheel
设置好secureCRT连接的hostname,username三、密钥制作记住不要upload四、上传生成的 Identity.pub至服务器该用户名的home/username下公钥的上传及设置
a.上传公钥(默认的后缀名为.pub).一般是用ftp上传.注意上传之前,一定要以ASCII格式上传.
b.服务器端的设置.首先要在要登录的用户home目录下建一个.ssh目录.
cp /home/houliangzhou/Identity.pub/home/houliangzhou/.ssh/chmod 755 /home/houliangzhou/.sshssh-keygen -i -f Identity.pub >>authorized_keyschmod 644 authorized_keys
五、修改sshd_config文件
vi /etc/ssh/sshd_config # $OpenBSD: sshd_config,v 1.73 2005/12/06 22:38:28 reyk Exp $ # This is the sshd server system-wideconfiguration file. See# sshd_config(5) for more information. # This sshd was compiled withPATH=/usr/local/bin:/bin:/usr/bin # The strategy used for options in thedefault sshd_config shipped with# OpenSSH is to specify options with theirdefault value where# possible, but leave them commented. Uncommented options change a# default value. #Port 22#Protocol 2,1Protocol 2#AddressFamily any#ListenAddress 0.0.0.0#ListenAddress :: # HostKey for protocol version 1#HostKey /etc/ssh/ssh_host_key# HostKeys for protocol version 2#HostKey /etc/ssh/ssh_host_rsa_key#HostKey /etc/ssh/ssh_host_dsa_key # Lifetime and size of ephemeral version 1server key#KeyRegenerationInterval 1h#ServerKeyBits 768 # Logging# obsoletes QuietMode and FascistLogging#SyslogFacility AUTHSyslogFacility AUTHPRIV#LogLevel INFO # Authentication: #LoginGraceTime 2m#PermitRootLogin no#StrictModes yes#MaxAuthTries 6 #RSAAuthentication yesPubkeyAuthentication yes #打开允许采用密钥方式远程登录AuthorizedKeysFile .ssh/authorized_keys #打开 # For this to work you will also need hostkeys in /etc/ssh/ssh_known_hosts#RhostsRSAAuthentication no# similar for protocol version 2#HostbasedAuthentication no# Change to yes if you don"t trust~/.ssh/known_hosts for#RhostsRSAAuthentication and HostbasedAuthentication#IgnoreUserKnownHosts no# Don"t readthe user"s ~/.rhosts and ~/.shosts files#IgnoreRhosts yes # To disable tunneled clear text passwords,change to no here!#PasswordAuthentication yes#PermitEmptyPasswords noPasswordAuthentication no #关闭密码验证AllowUsers root shaobingliusong houliangzhou lizhi zws #设置允许密码登录的账户 # Change to no to disable s/key passwords#ChallengeResponseAuthentication yes
六、修改保存之后重启sshd服务 ~]# servicesshd restart #重启sshd服务Stopping sshd: [ OK ]Starting sshd: [ OK ]Ubuntu 全新编译安装 OpenCV 2.3一条命令检测你的机器是否支持 3D Unity 界面相关资讯 Linux服务器 SecureCRT
- SecureCRT SSH连接一直提示密码错 (今 09:31)
- SecureCRT中Python脚本编写学习指 (12/20/2015 21:07:29)
- SecureCRT远程连接Ubuntu失败解决 (11/24/2015 12:05:58)
| - SecureCRT 使用技巧分享 (08月25日)
- SecureCRT 连接VirtualBox 中的 (12/14/2015 20:03:06)
- CentOS 7环境Linux服务器快速搭建 (10/22/2015 19:32:47)
|
本文评论 查看全部评论 (0)