0
点赞
收藏
分享

微信扫一扫

Windows Terminal配置

斗米 2022-10-02 阅读 158
  • 方式1:​​Microsoft Store下载​
  • 方式2:​​github下载​​
  • Windows Terminal配置_上传


  • ​​官网​​
  • 配置文件目录

 C:\Users\chnq\AppData\Local\Packages\Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe\LocalState

  • ​快捷键​

# 打开设置
ctrl + ,
# 切换窗口
ctrl + tab
# 关闭所有窗口
alt f4
# 关闭当前窗口
ctrl + shifr + w

  • 重置
  • Windows Terminal配置_sql_02

  • 基本设置
  • Windows Terminal配置_sql_03


  • Windows Terminal配置_上传_04


  • Windows Terminal配置_IDE_05

  • ​连接Linux​
  • 当前系统已安装OpenSSH客户端
  • Windows Terminal配置_上传_06


  • Windows Terminal配置_上传_07

ssh -p 22 user@xxx.xxx.xxx.xxx

  • 从服务器上传下载文件,​​参考​​

# 将本地文件夹下的back01.sql上传到Linux的home路径下
scp /Users/back01.sql root@192.168.43.157:/home

Windows Terminal配置_上传_08

# 将test文件夹上传到Linux的home目录下
scp -r /Users/test root@192.168.43.157:/home

Windows Terminal配置_sql_09

  • 从服务器下载文件到本地

PS C:\Users\chnq> scp root@192.168.43.157:/home/back01.sql /Users
root@192.168.43.157's password:
/Users/back01.sql: Permission denied # 下载失败,是因为本地的该文件夹需要管理员权限
PS C:\Users\chnq> scp root@192.168.43.157:/home/back01.sql D:\doc
root@192.168.43.157's password:
back01.sql 100% 1780 218.6KB/s 00:00

  • 从服务器下载文件夹到本地

PS C:\Users\chnq> scp -r root@192.168.43.157:/home/test D:\doc
root@192.168.43.157's password:
back01.sql 100% 1780 13.1KB/s 00:00

  • ​Terminal的缺陷​

# 不能输入中文
# 选中后不能直接复制
# ctrl + c 不能直接退出

  • ​补充​

# 使用命令ssh -p 22 user@xxx.xxx.xxx.xxx连接云服务器时报错
EAD+ychen224@CN-PF36VPKF MINGW64 ~
$ ssh -p 22 root@139.xxx.xxx.xxx
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ED25519 key sent by the remote host is
SHA256:hM3Q5I/z6ycMd0JUrwSJ/LAUUY7dlcxzDwm7wlMCn7M.
Please contact your system administrator.
Add correct host key in /c/Users/ychen224/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /c/Users/ychen224/.ssh/known_hosts:15
Host key for 139.xxx.xxx.xxx has changed and you have requested strict checking.
Host key verification failed.

# 解决方案:清楚本地公钥,再次连接
EAD+ychen224@CN-PF36VPKF MINGW64 ~
$ ssh-keygen -R xxx.xxx.xxx.xxx
# Host 139.xxx.xxx.xxx found: line 13
# Host 139.xxx.xxx.xxx found: line 14
# Host 139.xxx.xxx.xxx found: line 15
/c/Users/ychen224/.ssh/known_hosts updated.
Original contents retained as /c/Users/ychen224/.ssh/known_hosts.old



举报

相关推荐

0 条评论