1、修改属性文件:
root@kali:~# leafpad /etc/ssh/sshd_config
2、去掉#哈希标识PasswordAuthentication yes;
3、去掉#PermitRootLogin,修改为yes;
4、查看SSH服务状态:
root@kali:~# service ssh startroot@kali:~# /etc/init.d/ssh stauts
5、开机重启:
root@kali:~# update-rc.d ssh defaultsroot@kali:~# update-rc.d ssh enable
6、重启SSH服务:
root@kali:~# reboot
7、开启SSH协议服务:
root@kali:~# service ssh start
1、购买服务器2、加入安全组
3、修改实例名称,修改实例密码
1 查看ssh配置
2 安装SSH
3 启动服务
4 查看ssh服务的状态
输入以下命令:
5 在电脑终端输入
1.添加文件
2.添加公钥到文件内(id_rsa.pub)
3.编辑ssh配置文件:
4.重启sshd服务
5 在电脑终端输入
常见错误:
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:sbd8mG3CPJc81mLgPPwLwVy7LF8qvUUuXisbcPKzTyE.
Please contact your system administrator.
Add correct host key in /Users/admin/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/admin/.ssh/known_hosts:12
ECDSA host key for 47.96.118.128 has changed and you have requested strict checking.
Host key verification failed.
解决办法如下 输入
然后重新连接即可。
ssh 是非常简单方便的1、检查下windows和linux的IP地址,是否在同一个网段
2、windows下会有一到两个虚拟出来的网卡,看该网卡的IP地址是否和windows下的IP在同一网段
3、如果可以ping通,那么检查下linux的ssh开放情况:
(1)vi /etc/ssh/sshd_config 将这行开放 PermitRootLogin yes 将PermitRootLogin no 这行注释掉或删掉;
(2)service sshd restart 重启ssh服务
然后再用windows下的ssh登录工具来链接linux服务器。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)