您的位置:首页 > 运维架构 > Shell

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

2017-12-09 00:00 543 查看
假设你的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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Ubuntu