使用PowerShell连接Ubuntu
Ubuntu安装PowerShell
# Download the Microsoft repository GPG keys
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
# Register the Microsoft repository GPG keys
sudo dpkg -i packages-microsoft-prod.deb
# Update the list of products
sudo apt-get update
# Enable the "universe" repositories
sudo add-apt-repository universe
# Install PowerShell
sudo apt-get install -y powershell
# Start PowerShell
pwsh
配置Ubuntu允许PowerShell通过SSH连接
# 安装SSH
sudo apt install openssh-client
sudo apt install openssh-server
# 编辑 /etc/ssh 位置中的 sshd_config 文件。
# 确保已启用密码身份验证:
PasswordAuthentication yes
# 添加 PowerShell 子系统条目:
Subsystem powershell /usr/bin/pwsh -sshs -NoLogo -NoProfile
# 启用密钥身份验证(可选)
PubkeyAuthentication yes
重启 sshd 服务
sudo service sshd restart
在Windows下通过PowerShell 连接 Ubuntu
New-PSSession -HostName UserA@LinuxServer01

使用PowerShell连接Ubuntu的更多相关文章
- PowerShell 连接SQL
因为对SQL操作比较多,但有些操作其实都是重复性的,只是参数不太一样了,例如silo id, server name 等.希望可以通过powershell脚本提高效率. 尝试如下 1. 使用Power ...
- ssh 连接ubuntu的虚拟机问题
我在winxp的虚拟机上装了一个ubuntu9.04的系统,winxp的ip为10.118.62.157,ubuntu的ip为192.168.116.1 两个ip互相ping都是正常的,但是,我在wi ...
- windows 远程桌面连接ubuntu xrdp 只看到墙纸其他什么都没有
用 windows 的 mstsc 连接 ubuntu 的 xrdp 时,进入后只看到墙纸,其他什么都没有,鼠标指针也不见,输入按键都无反应. 原来 Ubuntu 启动了 3d 桌面,导致 xrdp ...
- 使用Xshell连接Ubuntu
使用Xshell连接Ubuntu Xshell是一个安全终端模拟软件,可以进行远程登录.我使用XShell的主要目的是在Windows环境下登录Linux终端进行编码,非常方便.本文简单介绍下它的使用 ...
- []: secureCRT连接ubuntu问题- The remote system refused the connection
secureCRT连接ubuntu问题- The remote system refused the connection http://jxyang.iteye.com/blog/1484915 解 ...
- 如何使用SecureCRT连接ubuntu
1. 首先要明白什么是ssh? 可以把ssh看做是telnet的加强版,telnet的密码和信息都是不加密的,而ssh则加密. .2. 开启ubuntu上的ssh功能 先安装,安装后就自动开启了. s ...
- 使用putty连接Ubuntu虚拟机,使用ssh方式访问
1 前言 Ubuntu14.04版本是可以直接连接的,没想到新装的Ubuntu18.04竟然没有默认安装ssh. 则安装一下open-ssh-server就可以的. 2 步骤 2.1 更新一下源 命令 ...
- 使用MobaXterm远程连接Ubuntu,启动Octave,界面不能正常显示
使用MobaXterm远程连接Ubuntu,启动Octave,界面不能正常显示,键盘输入无法显示,解决方法如下. 在启动octave之前,输入这两个命令: export GTK_MODULES=gai ...
- 使用SecureCRT / win7远程桌面连接ubuntu配置记录(有更新)
2017-03-03 更新于末尾 1.Windows7 — Ubuntu 远程桌面连接中 Tab 键不能补全的解决办法 2.xrdp远程连接ubuntu无法使用原机的中文输入法 2017-02-22 ...
随机推荐
- map,reduce,filter基础实现
#coding=gbk from operator import add # 导入加法 # map 函数名 , 序列对象 print(list(map(str,range(5)))) print(li ...
- Seaborn基础2
import matplotlib.pyplot as plt import seaborn as sns import numpy as np def sinplot(flip = 1): x = ...
- Python os.lchflags() 方法
概述 os.lchflags() 方法用于设置路径的标记为数字标记,类似 chflags(),但是没有软链接.高佣联盟 www.cgewang.com 只支持在 Unix 下使用. 语法 lchfla ...
- Python time ctime()方法
描述 Python time ctime() 函数把一个时间戳(按秒计算的浮点数)转化为time.asctime()的形式.高佣联盟 www.cgewang.com 如果参数未给或者为None的时候, ...
- PDO::prepare
PDO::prepare — 准备要执行的SQL语句并返回一个 PDOStatement 对象(PHP 5 >= 5.1.0, PECL pdo >= 0.1.0) 说明 语法 publi ...
- Skill 脚本演示 ycChangeViaNumber.il
https://www.cnblogs.com/yeungchie/ ycChangeViaNumber.il 使用鼠标滚轮快速修改 Via 的数量. 回到目录
- P5468 [NOI2019]回家路线 斜率优化 dp
LINK:回家路线 (文化课 oi 双爆炸 对 没学上的就是我.(我错了不该这么丧的. 不过还能苟住一段时间.当然是去打NOI了 这道题去年同步赛的时候做过.不过这里再次提醒自己要认真仔细的看题目 不 ...
- luogu P2183 [国家集训队]礼物
LINK:礼物 n个物品 m个人 每个人要分得wi 个物品 每个物品互异 分给每个人的物品不分顺序 求方案数. \(n,p\leq 1e9 m\leq 5\) 方案数 那显然是 第一个人拿了w1件物品 ...
- windows:shellcode 远程线程hook/注入(一)
https://www.cnblogs.com/theseventhson/p/13199381.html 上次分享了通过APC注入方式,让目标线程运行shellcode.这么做有个前提条件:目标线程 ...
- JDK1.8中HashMap的hash算法和寻址算法
JDK 1.8 中 HashMap 的 hash 算法和寻址算法 HashMap 源码 hash() 方法 static final int hash(Object key) { int h; ret ...