xshell连接win10 Hyper-v中的Ubuntu系统

原创
2017/12/09 21:57
阅读数 7K

假设你的Ubuntu已经通过Hyper-V安装好。

1、首先需要为Ubuntu建立网络桥接,为了使Ubuntu能联网。激活了Hyper-V之后,本地的网络设置会自动出现一个名为vEthernet(默认开关)的网络选项,选中本地的以太网+vEthernet之后,选择桥接,稍后本地会出现一个网桥项。

2、在ubuntu系统中,按住Ctrl+Alt+T调出命令行窗口。执行以下命令:

(1)sudo apt-get update

(2)sudo apt-get install openssh-server

(3)sudo /etc/init.d/ssh start

(4)ps -ef | grep ssh

如果看到有 sshd -D选项,则说明ssh启动成功。

3、找到ubuntu系统的登录用户名和ip地址,在xshell中执行如:

ssh mengfeiyang@192.168.0.14

连接成功后如下:

4、git安装

http://blog.csdn.net/yhl_leo/article/details/50760140

5、安装JDK

https://www.cnblogs.com/a2211009/p/4265225.html

6、vsftpd安装,用于与主机共享目录

https://www.cnblogs.com/taoweiji/p/3821924.html

解决550 Permission Denied 方法:

/etc/vsftpd.conf文件中 
允许上传开启! 
# Uncomment this to enable any form of FTP write command. 
write_enable=YES 

然后重启vsftpd服务 

service vsftpd restart

配置完成后需要通过:ftp://192.168.0.14/ 访问目录。

7、其他问题解决:

ssh默认的端口是22,可以更改端口,更改后先stop,
然后start就可以了。改配置在/etc/ssh/sshd_config下


安装 sudo apt-get install openssh-server  
可能报错
The following packages have unmet dependencies:
 openssh-server : Depends: openssh-client (= 1:5.9p1-5ubuntu1)
                  Recommends: xauth but it is not going to be installed
                  Recommends: ssh-import-id but it is not going to be installed
解决办法
先装一个依赖的指定版本的 openssh-client (旧版):
sudo apt-get install openssh-client=1:5.9p1-5ubuntu1

展开阅读全文
加载中
点击引领话题📣 发布并加入讨论🔥
0 评论
0 收藏
0
分享
返回顶部
顶部