AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 877091
Accepted
DevOpsSauce
DevOpsSauce
Asked: 2017-01-28 17:49:56 +0800 CST2017-01-28 17:49:56 +0800 CST 2017-01-28 17:49:56 +0800 CST

SSH 适用于 Windows 虚拟机,但不适用于本机 Ubuntu 机器

  • 772

我必须通过学校的 VPN 连接到 Linux 服务器。我可以通过我的 Windows 虚拟机通过 Putty 进行连接,也可以连接到 VPN (Cisco AnyConnect),但我无法在我的本地 Ubuntu 机器上连接。VPN通过我的终端成功,而不是ssh。我尝试 ping 服务器,它就在那里。当我尝试 ssh 进入服务器时,我得到“连接超时”。

如果我可以在我的虚拟机上进行连接,是什么阻止我连接?有什么建议么?

注意:我留下了实际名称和 IP。

这是我连接到 VPN 时的输出:

christopher@HAL:~$ sudo openconnect -s /etc/vpnc/vpnc-script https://secureconnect.some_university.edu
[sudo] password for christopher: 
POST https://secureconnect.some_university.edu/
Attempting to connect to server xx.xx.xx.xx:443
SSL negotiation with secureconnect.some_university.edu
Connected to HTTPS on secureconnect.some_university.edu
Got HTTP response: HTTP/1.0 302 Object Moved
GET https://secureconnect.some_university.edu/
Attempting to connect to server xx.xx.xx.xx:443
SSL negotiation with secureconnect.some_university.edu
Connected to HTTPS on secureconnect.some_university.edu
Got HTTP response: HTTP/1.0 302 Object Moved
GET https://secureconnect.some_university.edu/+webvpn+/index.html
SSL negotiation with secureconnect.some_university.edu
Connected to HTTPS on secureconnect.some_university.edu
Please enter your username and password.
GROUP: [xxxxx]:xxxxx <-- leaving name out
Please enter your username and password.
Username:<my_username>
Password:xxxxxxxxx   
POST https://secureconnect.some_university.edu/+webvpn+/index.html
Got CONNECT response: HTTP/1.1 200 OK
CSTP connected. DPD 30, Keepalive 20
/bin/sh: 1: /etc/vpnc/vpnc-script: not found
Script '/etc/vpnc/vpnc-script' returned error 127
/bin/sh: 1: /etc/vpnc/vpnc-script: not found
Script '/etc/vpnc/vpnc-script' returned error 127
Connected tun0 as 192.168.30.106, using SSL
Established DTLS connection (using GnuTLS). Ciphersuite (DTLS0.9)-(RSA)-(AES-256-CBC)-(SHA1).

这是我在连接到 VPN 后尝试通过 ssh 进入服务器:

christopher@HAL:~$ ssh -v xxxxxxx.some_university.edu
OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g  1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for xxxxxxx.some_university.edu
debug1: Connecting to uisacad.uis.edu [xxx.xxx.xxx.xxx] port 22.
debug1: connect to address xxx.xxx.xxx.xxx port 22: Connection timed out
ssh: connect to host xxxxxxx.some_university.edu port 22: Connection timed out
ssh
  • 1 1 个回答
  • 542 Views

1 个回答

  • Voted
  1. Best Answer
    DevOpsSauce
    2017-01-30T22:44:59+08:002017-01-30T22:44:59+08:00

    答案一直摆在我面前!这些行在这里:

    /bin/sh: 1: /etc/vpnc/vpnc-script: not found <-- realized it here
    Script '/etc/vpnc/vpnc-script' returned error 127 
    /bin/sh: 1: /etc/vpnc/vpnc-script: not found
    Script '/etc/vpnc/vpnc-script' returned error 127
    

    我运行了“locate vpnc-script”,我发现由于某种原因它在我安装它时位于 /usr/share/vpnc/ 中。所以,我做了一个 mkdir /etc/vpnc 然后把 /usr/share/vpnc 里面的所有东西都移到那里,改变了适当的权限,瞧!有用!我 ssh 进入服务器并立即连接!这将使事情变得容易得多,因为我厌倦了使用我的虚拟机。

    • 0

相关问题

  • Gnome-terminal 快捷方式在选项卡中打开多个 ssh 连接

  • 通过 SSH 禁用密码访问?

  • ssh 如何使用多个私钥?

  • 如何通过一个 SSH 连接拥有多个终端会话?

  • 如何与无头服务器进行图形交互?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve