win7 Ubuntu SSH相互连接
2016-04-19 14:01
274 查看
win7 ssh client to ssh server:
1.下载ssh server:MobaSSH_Server:http://mobassh.mobatek.net/MobaSSH_Server_Home_1.60.zip
2.下载ssh client: puttyhttp://the.earth.li/~sgtatham/putty/0.67/x86/putty.exe
putty增强版:https://github.com/FauxFaux/PuTTYTray/releases/tag/p0.66-t028
3. 测试本地连接ssh:输入Host Name为127.0.0.1 ==>open
login as:winName
winName@127.0.0.1's password:
VMware Ubuntu server ssh client to Win7 ssh server:
1.ubuntu默认已经安装 ssh client
也可 sudo adp-get install openssh-client
2.登录:
ssh 192.168.19.132 -l winName
winName@192.168.19.132’s password:
Win7 ssh client to VMware Ubuntu server ssh server:
1.sudo apt-get install openssh-server
2.查看运行状态ps -e | grep ssh 或者 ps aux|grep ssh
如果发现sshd表明服务器正常
3.执行./etc/init.d/ssh start
4.本地测试
ssh localhost
一律yes
如错选no可以换ssh 127.0.0.1
如再错选no可以重新生成公钥和私钥
ssh-keygen -t rsa -P ""
回车保存,追加公钥到文件
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
测试ssh localhost
显示:
Welcome to Ubuntu 15.10 (GNU/Linux 4.2.0-16-generic x86_64)
* Documentation: https://help.ubuntu.com/
Last login: xxxxxxx
本地测试成功
5.查看Ubuntu ip
ifconfig -a
6.win7 打开putty
输入Host Name为192.168.19.130(Ubuntu ip) ==>open
一律yes
login as:ubuntuName
ubuntuName@192.168.19.130's password:
注意:ubuntuName不能为root权限
可以在Ubuntu中打开root远程登录权限:
输入root账户和密码
编辑ssh的配置文件,命令:nano /etc/ssh/sshd_config
在Authentication部分,注释掉“PermitRootLogin without-password”
在Authentication部分,添加“PermitRootLogin yes”
重新启动ssh服务,命令:sudo service ssh restart
然后就可以使用root帐号登录ssh
ctrl+d或者 exit 退出远程登录
1.下载ssh server:MobaSSH_Server:http://mobassh.mobatek.net/MobaSSH_Server_Home_1.60.zip
2.下载ssh client: puttyhttp://the.earth.li/~sgtatham/putty/0.67/x86/putty.exe
putty增强版:https://github.com/FauxFaux/PuTTYTray/releases/tag/p0.66-t028
3. 测试本地连接ssh:输入Host Name为127.0.0.1 ==>open
login as:winName
winName@127.0.0.1's password:
VMware Ubuntu server ssh client to Win7 ssh server:
1.ubuntu默认已经安装 ssh client
也可 sudo adp-get install openssh-client
2.登录:
ssh 192.168.19.132 -l winName
winName@192.168.19.132’s password:
Win7 ssh client to VMware Ubuntu server ssh server:
1.sudo apt-get install openssh-server
2.查看运行状态ps -e | grep ssh 或者 ps aux|grep ssh
如果发现sshd表明服务器正常
3.执行./etc/init.d/ssh start
4.本地测试
ssh localhost
一律yes
如错选no可以换ssh 127.0.0.1
如再错选no可以重新生成公钥和私钥
ssh-keygen -t rsa -P ""
回车保存,追加公钥到文件
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
测试ssh localhost
显示:
Welcome to Ubuntu 15.10 (GNU/Linux 4.2.0-16-generic x86_64)
* Documentation: https://help.ubuntu.com/
Last login: xxxxxxx
本地测试成功
5.查看Ubuntu ip
ifconfig -a
6.win7 打开putty
输入Host Name为192.168.19.130(Ubuntu ip) ==>open
一律yes
login as:ubuntuName
ubuntuName@192.168.19.130's password:
注意:ubuntuName不能为root权限
可以在Ubuntu中打开root远程登录权限:
输入root账户和密码
编辑ssh的配置文件,命令:nano /etc/ssh/sshd_config
在Authentication部分,注释掉“PermitRootLogin without-password”
在Authentication部分,添加“PermitRootLogin yes”
重新启动ssh服务,命令:sudo service ssh restart
然后就可以使用root帐号登录ssh
ctrl+d或者 exit 退出远程登录
相关文章推荐
- 趣谈Java反射调用
- [LeetCode][JavaScript]Power of Four
- 对InputStreamReader 和 OutputStreamWriter的理解
- 算法复习——归并排序
- Java中几种遍历map的方法
- ZZULIOJ 1883: 蛤玮当上主席【妙脆角】
- 身份证验证
- HttpClient Get/Post方式调用Http接口
- jQuery图片无缝滚动JS代码ul/li结构
- 相机,闪光灯
- HTML基础学习(一)—HTML
- (Array,位操作)137. Single Number II
- 线性表
- 284. Peeking Iterator
- 工作遇到的问题总结
- linux 网络编程基础(一)(tcp)
- 前端图标神器
- iphone数据存储-Core Data的使用
- mysql取前10条数的查询语句
- 咏南 DELPHI DATASNAP LINUX中间件