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
    • 最新
    • 标签
主页 / user-291278

Adaddinsane's questions

Martin Hope
Adaddinsane
Asked: 2022-12-11 07:25:37 +0800 CST

SSH 代理转发失败

  • 5

我有一个 DigitalOcean 液滴,我试图从 Github 克隆一个回购协议。

这在我的本地机器上运行良好,我一直在关注 Github 上的指南:

https://docs.github.com/en/developers/overview/using-ssh-agent-forwarding

我不得不eval $(ssh-agent -s)在服务器上手动启用 SSH 代理,但据我所知代理转发没有发生,因为我无法ssh -T [email protected]从服务器使用,调试输出ssh -v [email protected]是:

OpenSSH_8.2p1 Ubuntu-4ubuntu0.5, OpenSSL 1.1.1f  31 Mar 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to github.com [140.82.121.3] port 22.
debug1: Connection established.
debug1: identity file /root/.ssh/id_rsa type -1
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: identity file /root/.ssh/id_dsa type -1
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: identity file /root/.ssh/id_ecdsa_sk type -1
debug1: identity file /root/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: identity file /root/.ssh/id_ed25519_sk type -1
debug1: identity file /root/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /root/.ssh/id_xmss type -1
debug1: identity file /root/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.5
debug1: Remote protocol version 2.0, remote software version babeld-181fb29f
debug1: no match: babeld-181fb29f
debug1: Authenticating to github.com:22 as 'git'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM
The authenticity of host 'github.com (140.82.121.3)' can't be established.
ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com,140.82.121.3' (ECDSA) to the list of known hosts.
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: Will attempt key: /root/.ssh/id_rsa 
debug1: Will attempt key: /root/.ssh/id_dsa 
debug1: Will attempt key: /root/.ssh/id_ecdsa 
debug1: Will attempt key: /root/.ssh/id_ecdsa_sk 
debug1: Will attempt key: /root/.ssh/id_ed25519 
debug1: Will attempt key: /root/.ssh/id_ed25519_sk 
debug1: Will attempt key: /root/.ssh/id_xmss 
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256,ssh-rsa>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Trying private key: /root/.ssh/id_ecdsa
debug1: Trying private key: /root/.ssh/id_ecdsa_sk
debug1: Trying private key: /root/.ssh/id_ed25519
debug1: Trying private key: /root/.ssh/id_ed25519_sk
debug1: Trying private key: /root/.ssh/id_xmss
debug1: No more authentication methods to try.
[email protected]: Permission denied (publickey).

在本地机器上,我为服务器 IP 创建了一个配置条目:

Host x.x.x.x
    ForwardAgent yes

我还将服务器上的 sshd_config 文件编辑为:

AllowAgentForwarding yes

我使用以下方法在本地机器上添加了本地密钥:ssh-add ~/.ssh/id_rsa

我不知道还能做什么,几个小时以来我一直在为此苦苦思索。(我已经阅读了我能找到的所有内容,但没有任何帮助。)

ssh
  • 2 个回答
  • 35 Views
Martin Hope
Adaddinsane
Asked: 2018-12-30 02:27:55 +0800 CST

在 VPS 上设置 webmin 缺少包和存储库

  • 1

我只是想将 webmin 设置为新 VPS 上的第一件事,我熟悉 Ubuntu(它是我的主要工作机器)。

这就是 VPS 上的内容

Description:    Debian GNU/Linux 8.5 (jessie)
Release:    8.5
Codename:    jessie

所以我按照说明下载并安装 virtualmin:

wget http://software.virtualmin.com/gpl/scripts/install.sh
sudo /bin/sh install.sh

它开始很好,但最终失败了:

[INFO] 在 /root/virtualmin-install.log 中开始安装日志

▣□□ Phase 1 of 3: Setup
Installing extra dependencies for Debian 8                              [  ✔  ]
Downloading apt.gpg                                                     [  ✔  ]
Adding GPG key for PHP7 packages                                        [  ✔  ]
Downloading RPM-GPG-KEY-virtualmin-6                                    [  ✔  ]
Downloading RPM-GPG-KEY-webmin                                          [  ✔  ]
Installing Virtualmin 6 key                                             [  ✔  ]
Installing Webmin key                                                   [  ✔  ]
Updating apt metadata                                                   [  ✔  ]
Downloading repository metadata                                         [  ✔  ]
Disabling cdrom: repositories                                           [  ✔  ]
Cleaning out old metadata                                               [  ✔  ]

▣▣□ Phase 2 of 3: Installation
Installing Webmin                                                       [ERROR] Failed with error: 100
[  ✘  ]

[ERROR] Something went wrong. Exiting.
[ERROR] The last few log entries were:
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 webmin : Depends: libauthen-pam-perl but it is not installable
          Depends: libio-pty-perl but it is not installable
          Depends: apt-show-versions but it is not installable
E: Unable to correct problems, you have held broken packages.
#

这是sources.list的样子

deb http://security.debian.org/ jessie/updates main contrib
deb-src http://security.debian.org/ jessie/updates main contrib

# jessie-updates, previously known as 'volatile'
# A network mirror was not selected during install.  The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
#deb http://ftp.debian.org/debian/ jessie-updates main contrib
#deb-src http://ftp.debian.org/debian/ jessie-updates main contrib
deb http://software.virtualmin.com/vm/6/gpl/apt virtualmin-jessie main
deb http://software.virtualmin.com/vm/6/gpl/apt virtualmin-universal main

然后我尝试安装一个丢失的包(并为每个丢失的包获得相同的响应):

sudo apt install libauthen-pam-perl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libauthen-pam-perl is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libauthen-pam-perl' has no installation candidate

因此,我尝试添加包含apt-show-versions(缺少的包之一)的存储库:

sudo add-apt-repository ...

但是该命令(add-apt-repository)不存在。所以我尝试加载software-properties-common,也找不到那个包。

我怎样才能摆脱这种精神错乱,把东西装满?

这就是我得到的sudo apt update:

Hit http://software.virtualmin.com virtualmin-jessie InRelease                                                   
Hit http://software.virtualmin.com virtualmin-universal InRelease                                                
Hit http://packages.sury.org jessie InRelease                                                                    
Hit http://security.debian.org jessie/updates InRelease                 
Hit http://software.virtualmin.com virtualmin-jessie/main amd64 Packages
Hit http://packages.sury.org jessie/main amd64 Packages                                    
Get:1 http://packages.sury.org jessie/main Translation-en_GB [169 B]                       
Get:2 http://packages.sury.org jessie/main Translation-en [169 B]                         
Hit http://security.debian.org jessie/updates/main Sources                         
Hit http://security.debian.org jessie/updates/contrib Sources                                      
Hit http://security.debian.org jessie/updates/main amd64 Packages                                  
Get:3 http://packages.sury.org jessie/main Translation-en_GB [169 B]                               
Hit http://security.debian.org jessie/updates/contrib amd64 Packages                                                    
Hit http://security.debian.org jessie/updates/contrib Translation-en                                   
Hit http://security.debian.org jessie/updates/main Translation-en                                      
Get:4 http://packages.sury.org jessie/main Translation-en [169 B]                
Hit http://software.virtualmin.com virtualmin-universal/main amd64 Packages                         
Get:5 http://packages.sury.org jessie/main Translation-en_GB [169 B]
Get:6 http://packages.sury.org jessie/main Translation-en [169 B]                  
Get:7 http://packages.sury.org jessie/main Translation-en_GB [169 B]
Get:8 http://packages.sury.org jessie/main Translation-en [169 B]                  
Get:9 http://packages.sury.org jessie/main Translation-en_GB [169 B]            
Ign http://packages.sury.org jessie/main Translation-en_GB                             
Get:10 http://packages.sury.org jessie/main Translation-en [169 B]
Ign http://packages.sury.org jessie/main Translation-en        
Ign http://software.virtualmin.com virtualmin-jessie/main Translation-en_GB
Ign http://software.virtualmin.com virtualmin-jessie/main Translation-en
Ign http://software.virtualmin.com virtualmin-universal/main Translation-en_GB
Ign http://software.virtualmin.com virtualmin-universal/main Translation-en
debian vps
  • 1 个回答
  • 621 Views

Sidebar

Stats

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

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve