我正在使用 microsoft ubuntu 终端使用 PEM 密钥连接到我的 EC2 实例。根据对这个问题的建议,我确实更改了权限。即使那样我也收到错误
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for 'pem_key.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "pem_key.pem": bad permissions
ec2-****.us-***.compute.amazonaws.com: Permission denied (publickey).
Run Code Online (Sandbox Code Playgroud)
这是我尝试过的...
chmod 600 pem_key.pem
ssh -i "pem_key.pem" ubuntu@ec2-****.us-***.compute.amazonaws.com
Run Code Online (Sandbox Code Playgroud)
我该如何解决这个问题。这是我的配置:
操作系统:Windows 10
外壳:微软 Ubuntu 终端
ssh amazon-ec2 permission-denied amazon-web-services windows-subsystem-for-linux
我在使用 Android Studios、WSL2 和 React Native 时玩得很不开心。
每天我都有一些工作要做,其他的事情就会中断。昨天,一切正常,现在我无法从我的应用程序连接到我的服务器。
我不知道该去哪里问这个问题,但我感到绝望。我一直试图解决这个问题大约八天。我不能。我需要帮助。
我不是一个流利的开发人员。为了尽可能的澄清,我做了这个分步清单。
大部分内容都基于本教程,这是使 WSL2 + Android Studios 协同工作的唯一原因。
我在做什么,按顺序:
adb kill-server
adb -a nodaemon server start
Run Code Online (Sandbox Code Playgroud)
unset ADB_SERVER_SOCKET
socat -d -d TCP-LISTEN:5037,reuseaddr,fork TCP:$(cat /etc/resolv.conf | tail -n1 | cut -d " " -f 2):5037
Run Code Online (Sandbox Code Playgroud)
iex "netsh interface portproxy delete v4tov4 listenport=8081 listenaddress=127.0.0.1" | out-null;
$WSL_CLIENT = bash.exe -c …Run Code Online (Sandbox Code Playgroud) android android-studio react-native axios windows-subsystem-for-linux
我试图学习基于 GUI 的 python,因此我使用了 Tkinter 库。我的操作系统是 Windows,但我已安装 Ubuntu wsl 作为我的默认终端,并使用 wsl vscode 作为我的默认文本编辑器。我只是使用此示例代码创建一个基本窗口来检查它是否有效:
from Tkinter import *
def onclick():
pass
root = Tk()
text = Text(root)
text.insert(INSERT, "Hello.....")
text.insert(END, "Bye Bye.....")
text.pack()
text.tag_add("here", "1.0", "1.4")
text.tag_add("start", "1.8", "1.13")
text.tag_config("here", background="yellow", foreground="blue")
text.tag_config("start", background="black", foreground="green")
root.mainloop()
Run Code Online (Sandbox Code Playgroud)
结果发现它不适用于 python3.8。 终端错误消息 我查找了多个资源和论坛,但找不到任何合适的解决方案。以下是我提到的几个链接: https://realpython.com/python-gui-tkinter/ https://tkdocs.com/tutorial/install.html https://askubuntu.com/questions/1224230/how -安装-tkinter-for-python-3-8。我发现的一个解决方法是安装使用 python3.7 的 anaconda 并使用 Windows 终端(使用 pycharm 而不是 vscode)。看起来它运行正常。 使用 python3.7 的 GUI
问题是.. 与 Windows 命令行相比,我更喜欢 wsl 和 vscode,并且我想恢复到它。有什么解决办法吗?我真的不想在这条路径上浪费太多时间,因为我之前有过一次糟糕的经历(但如果它能解决我的问题,我愿意再做一次)。谢谢你听我说完。
我无法更改 mongoDB (WSL2 Arch) 的 dbpath,我运行以下命令:
sudo mongod --dbpath /home/arijit/work/data/
Run Code Online (Sandbox Code Playgroud)
数据文件夹权限:
drwxr-xr-x 2 mongodb mongodb 4096 Aug 9 10:00 data/
Run Code Online (Sandbox Code Playgroud)
我收到的错误消息:
{"t":{"$date":"2020-08-09T11:55:45.163+05:30"},"s":"I", "c":"CONTROL", "id":23285, "ctx":"main","msg":"Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols 'none'"}
{"t":{"$date":"2020-08-09T11:55:45.228+05:30"},"s":"W", "c":"ASIO", "id":22601, "ctx":"main","msg":"No TransportLayer configured during NetworkInterface startup"}
{"t":{"$date":"2020-08-09T11:55:45.229+05:30"},"s":"I", "c":"NETWORK", "id":4648601, "ctx":"main","msg":"Implicit TCP FastOpen unavailable. If TCP FastOpen is required, set tcpFastOpenServer, tcpFastOpenClient, and tcpFastOpenQueueSize."}
{"t":{"$date":"2020-08-09T11:55:45.231+05:30"},"s":"I", "c":"STORAGE", "id":4615611, "ctx":"initandlisten","msg":"MongoDB starting","attr":{"pid":2643,"port":27017,"dbPath":"/home/arijit/work/data/","architecture":"64-bit","host":"ARIJIT-PC-wsl"}}
{"t":{"$date":"2020-08-09T11:55:45.231+05:30"},"s":"I", "c":"CONTROL", "id":23403, "ctx":"initandlisten","msg":"Build Info","attr":{"buildInfo":{"version":"4.4.0","gitVersion":"563487e100c4215e2dce98d0af2a6a5a2d67c5cf","openSSLVersion":"OpenSSL 1.1.1g 21 Apr 2020","modules":[],"allocator":"tcmalloc","environment":{"distmod":"ubuntu1804","distarch":"x86_64","target_arch":"x86_64"}}}}
{"t":{"$date":"2020-08-09T11:55:45.231+05:30"},"s":"I", "c":"CONTROL", "id":51765, "ctx":"initandlisten","msg":"Operating System","attr":{"os":{"name":"Arch","version":"rolling"}}} …Run Code Online (Sandbox Code Playgroud) 我曾经能够通过本地文件路径访问 Windows 中的 WSL 文件系统(例如通过文件资源管理器)。
我最近升级到 WSL 2,据我所知,文件系统在网络上。有谁知道我如何从 Windows 端访问 WSL2 中的文件?
编辑:我最终放弃了默认的 WSL Ubuntu 控制台并按照此处的说明转移到 Windows 终端,现在一切正常。
我在 WSL 2(Ubuntu 20.04,如果有的话)上安装了 Oh-my-zsh,我得到的是问号,而不是提示中应该出现的任何内容。它看起来像这样(主题设置为“agnoster”): 问号
我查了一下,最流行的建议是安装 powerline 字体,因此我按照此处的说明进行操作:How to install Powerline fonts on WSL? 。我确实能够在控制台的设置中将字体设置为电力线字体,但问题没有解决(我尝试重新启动计算机,但仍然不起作用)。
我看到了有关 iTerm 的类似问题,但我无法从中提取我可以采取的相关步骤。
有什么建议吗?
我无法使用以下命令在 WSL 中启动 nessus:
/bin/systemctl start nessusd.service
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
Run Code Online (Sandbox Code Playgroud) 在将此标记为重复之前,我已经为此奋斗了相当长一段时间,并尝试了我在网上找到的所有故障排除选项。希望有人知道发生了什么事。
当我尝试执行plotly.express 导入时,它失败并出现以下错误:
File "/mnt/e/Backup/facebook/plotly.py", line 2, in <module>
import plotly.express as px
ModuleNotFoundError: No module named 'plotly.express'; 'plotly' is not a package
Run Code Online (Sandbox Code Playgroud)
如果我尝试,import plotly我不会收到任何错误,但无法使用plotly.express。
我看到的错误修复全部都指向未安装并通过 pip 进行安装。运行pip3 list表明plotly已安装。
ahren@AhrBeast:~$ pip3 list | grep plotly
plotly 4.11.0
plotly-express 0.4.1
Run Code Online (Sandbox Code Playgroud)
从终端导入plotly.express工作正常:
ahren@AhrBeast:~$ python3
Python 3.8.2 (default, Jul 16 2020, 14:00:26)
[GCC 9.3.0] on linux
>>> import plotly.express as px
>>> px.data.iris()
sepal_length sepal_width petal_length petal_width species species_id
0 5.1 3.5 1.4 0.2 setosa 1
1 4.9 3.0 …Run Code Online (Sandbox Code Playgroud) 我是 WSL 和 vim 的一个相当新的用户,我想为终端 vim 安装一个新的颜色方案。我执行标准步骤:创建一个 ~/.vim/colors 目录,然后将 theme.vim 文件移动到那里。当我打开 vim 时,我可以使用 :colorscheme 选择它们,但是我得到的主题与我安装的主题完全不同。我现在尝试了三个不同的主题,但没有一个按预期工作。
这里有人知道这可能是什么原因吗?
windows-subsystem-for-linux ×10
python ×3
wsl-2 ×3
amazon-ec2 ×1
android ×1
axios ×1
color-scheme ×1
interpreter ×1
mongodb ×1
nessus ×1
oh-my-zsh ×1
pip ×1
plotly ×1
pycharm ×1
python-3.x ×1
react-native ×1
ssh ×1
terminal ×1
tkinter ×1
ubuntu ×1
vim ×1
zsh ×1