LiyuanHu91的个人博客分享 http://blog.sciencenet.cn/u/LiyuanHu91

博文

Win10 Powershell通过ssh访问linux(有图形界面)

已有 4743 次阅读 2021-1-25 21:47 |个人分类:计算机使用|系统分类:科研笔记

好久没更,今天学到了一点新技能,赶紧整理一下,以免后面遗忘。

一、内容如题,折腾过程如下:

(1)下载xming并安装:https://sourceforge.net/projects/xming/

(一路安装,同时在桌面上添加了xming和xlaunch快捷方式)

(2)打开powershell:win10“搜索”里输入powershell并打开。

(3)在powershell中输入:setx DISPLAY "localhost:0.0"。而后重启powershell。

(4)在powershell中输入:ssh -Yp 端口号 用户名@地址。结果报错如下:

CreateProcessW failed error:2

ssh_askpass: posix_spawn: No such file or directory

Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password)

(5)报错解决:

在powershell中,输入

cd / 

mkdir dev 

cd dev 

mkdir tty

在powershell中输入:ssh -Yp 端口号 用户名@地址。问题居然解决了,说实话不是很清楚原因。

二、折腾过后,得到基本操作流程

(1)打开xlaunch,如无对多屏幕的需要,只需一路next。

(2)打开powershell,ssh -Y远程,测试cern root,成功看到cern root欢迎界面;nautilus .可打开当前目录图形界面。

【参考资料】

(1)Remote Access on Windows with Powershell:https://www.cs.swarthmore.edu/courses/CS21/S20/powershell-instructions.html

(2)利用Xming 将Linux 图形界面输出到Windows上:http://www.uuc.me/1211.html



https://blog.sciencenet.cn/blog-3121583-1268950.html

上一篇:Editorial Manager投稿过程中遇到的问题及其解决
下一篇:球面均匀分布抽样
收藏 IP: 221.212.116.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (2 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-6-29 21:59

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部