我刚刚安装了 Ubuntu。我如何设置它以允许我 ssh 进入它?
现在我得到“ssh:连接到主机 xxxx 端口 22:操作超时”。
我正在尝试按照wiki.linaro.org(在我的 Ubuntu 10.04 VM 上)上的“在 Ubuntu 10.04(Lucid)和 10.10(Maverick)主机上安装交叉工具链”说明进行操作。第一步是:
sudo add-apt-repository ppa:linaro-maintainers/toolchain
Run Code Online (Sandbox Code Playgroud)
但是当我运行时,我得到:
Error reading https://launchpad.net/api/1.0/~linaro-maintainers/+archive/toolchain: <urlopen error [Errno 110] Connection timed out>
Run Code Online (Sandbox Code Playgroud)
我猜问题出在我雇主代理服务器的配置上,尤其是 HTTPS。
当我在 Firefox 中打开https://launchpad.net/api/1.0/~linaro-maintainers/+archive/toolchain时,我得到“连接超时”。然后我进入 Firefox 首选项 -> 高级 -> 网络 -> 设置...并将 HTTP 代理设置为“网关”,将端口设置为 8080,并选中“将此代理服务器用于所有协议”。然后页面加载。这支持了我的理论。
我试过设置 http_proxy 和 https_proxy 环境变量(小写和大写):
$ set | grep -i proxy
HTTPS_PROXY=https://gateway:8080
HTTP_PROXY=http://gateway:8080
http_proxy=http://gateway:8080
https_proxy=https://gateway:8080
Run Code Online (Sandbox Code Playgroud)
我也尝试将它们更改为:
$ set | grep -i proxy
HTTPS_PROXY=gateway:8080
HTTP_PROXY=gateway:8080
http_proxy=gateway:8080
https_proxy=gateway:8080
Run Code Online (Sandbox Code Playgroud)
我尝试将第二行添加到 /etc/apt/apt.conf:
Acquire::http::proxy "http://gateway:8080/";
Acquire::https::proxy "https://gateway:8080/";
Run Code Online (Sandbox Code Playgroud)
但我继续遇到同样的错误。
我该如何解决这个问题?
更新:我跟着指示 …
help.ubuntu.com/community/SSH/OpenSSH/Configuring 中的说明建议禁用密码身份验证,以便“只能从您特别批准的计算机进行连接”。但他们没有说明如何专门批准一台计算机。我怎么做?