sshportal icon indicating copy to clipboard operation
sshportal copied to clipboard

SSH Agent forward - no keys

Open GreyOBox opened this issue 4 years ago • 2 comments

What happened: Configured access to server with SSH Portal. Direct access with standard SSH is available too. In my ~/.ssh/config:

ForwardAgent yes

Connected to server using SSH Portal:

server:~$ env | grep SSH
SSH_CLIENT=172.16.16.25 51416 22
SSH_TTY=/dev/pts/0
SSH_AUTH_SOCK=/tmp/ssh-6tFsyytTKi/agent.11568
SSH_CONNECTION=172.16.16.25 51416 172.30.12.200 22

server:~$ ssh-add -L
error fetching identities for protocol 2: communication with agent failed
The agent has no identities.

Connected with standard SSH:

server:~$ env | grep SSH
SSH_CLIENT=172.16.0.25 49554 22
SSH_TTY=/dev/pts/12
SSH_AUTH_SOCK=/tmp/ssh-An97pQFU6G/agent.11641
SSH_CONNECTION=172.16.0.25 49554 172.30.12.200 22

server:~$ ssh-add -L
ssh-rsa A....

What you expected to happen:

SSH compatibility ssh-agent support

I have to be able to get my forwarded SSH key when I use SSH Portal.

How to reproduce it (as minimally and precisely as possible):

  • Enable ForwardAgent yes in SSH client config
  • Start SSH Portal in Docker
  • Add one host
  • Connect to this host using SSH Portal and standard SSH
  • Check and compare ssh-add -L output

Environment:

  • sshportal --version
v1.14.1
  • ssh sshportal info
debug mode (server): false
Hostname: 8f0e133f06a4
CPUs: 2
Demo mode: false
DB Driver: sqlite3
DB Conn: ./sshportal.db
Bind Address: :2222
System Time: 2020-08-24T12:02:00.520857117Z
OS Type: linux
OS Architecture: amd64
Go routines: 42
Go version (build): go1.14.7
Uptime: 100h58m34.450236547s
User ID: 1
User email: [email protected]
Version: n/a
GIT SHA: n/a
GIT Tag: n/a
  • OS (e.g. from /etc/os-release):
NAME="Ubuntu"
VERSION="18.04.4 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.4 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
  • install method (e.g. go/docker/brew/...): Docker

GreyOBox avatar Aug 24 '20 12:08 GreyOBox

Strange. Readme state ssh-agent support, but what it means if there is no agent forwarding?

mou avatar Dec 15 '20 19:12 mou

Same issue here. ssh-agent support is written in the readme but ssh-agent is not working.

This project looks great, but without ssh-agent forwarding it's almost useless...

raoulh avatar Jun 05 '21 07:06 raoulh