Gathering ssh config connection issues #601
Closed
opened 2024-04-01 08:44:50 +00:00 by moritz
·
8 comments
Labels
Clear labels
abra
awaiting-feedback
backups
bug
build
ci/cd
community organising
contributing
coopcloud.tech
design
documentation
duplicate
enhancement
fedi
fedi-infra
finance
funding
good first issue
help wanted
installer
legal
performance
proposal
question
security
test
wontfix
Everything to do with abra
Ping/pong on comms
Something is not working
Go build related issues
Getting the robots into the mix
Opening this thing up
Contributors stuff
Our main website
Design thinking required
Let's write things together
This issue or pull request already exists
New feature
Democratic decision making
Money things
Anything related to grant funding
Easy start with development
Need some help
Installation related issues
Performance related
Large change which requires feedback & decisin making
More information is needed
Securing our shit
Unit or integration test suite
This won't be fixed
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
3wordchant
aadil (Aadil Ayub)
abra-bot (Abra Bot)
ammaratef45
amras (Sarma)
Apfelwurm
BornDeleuze
Brooke
carla
cas (Cassowary)
coopcloud
cyrnel
decentral1se (d1)
dede
devydave
fauno (fauno)
iexos
jade (Jade Ambrose)
jjsfunhouse
jmakdah2 (Jackie Makdah)
joe-irving (Joe Irving)
kawaiipunk (KawaiiPunk)
knoflook
kolaente
lambdabundesverband
linnealovespie (April)
moosemower
moritz
notplants
oxaliq (sorrel)
p4u1
pharaohgraphy (Andrew 🐦🔥❤️🔥✴️)
renovate-bot (Comrade Renovate Bot)
ripclap
simon
sixsmith (Sixsmith)
stevensting
trav (Trav Fryer)
val (val (he/him))
yksflip
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: toolshed/organising#601
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
First of all, why does abra even gather connection details from the ssh config? It uses
ssh -Gto parse the ssh config and reads the following connection details:hostname,user,portandIdentityFile.I came across a bug, because a user of one server was called
user. And if you look at this lined5ac3958a4/pkg/ssh/ssh.go (L49)it leads to crash abra with anindex out of rangeError.The next issue I came across is that I can only access my server using the
ProxyCommandparameter. So at the moment I can not use abra deploy anything on my server.Therefore I wonder if it's not possible to let abra be completely independent of the ssh config connection details. And use ssh with the user config instead of extracting specific connection details and reusing them. I think every custom ssh config can introduce some more issues if we try to extract all necessary connection details, instead of relying on the whole ssh config.
@moritz AFAIR the
ssh -G ...trick is to gather connection details to makeabra server add ...gather the correct details. If we didn't do this, we'd need to add a series of flags toabra server addwhich supported feeding these details in? E.g.--username,--port, etc.Checking the code again, I see we are invoking
/usr/bin/sshwith some flags:DEBU[0000] commandconn: starting ssh with [-o ConnectTimeout=60 -l <user> -p <port> -- <domain> docker system dial-stdio] caller="/drone/src/pkg/upstream/commandconn/commandconn.go:49 New"In this case,
<user>,<port>and<domain>is parsed from the Docker context, not the SSH configuration. You can verify by runningdocker context lsto see the connection details contained in a list based on whatabra server addfed in fromssh -G ....So, IIUC, you're proposing to drop all flags on the
/usr/bin/sshinvocation? And then we potentially use flags onabra server add ...to feed inusername,portandhostname?Something in this direction would be good because our tight coupling / re-working of SSH led to endless bugs and de-coupling has been better for us. This could help further. Could this also solve coop-cloud/organising#482?
Ok maybe my question was the wrong one. Why does abra need these details, when are they part of the ssh config?
If you connect to a host with ssh you also don't need to specify all these flags, if you have them in your ssh config.
Why not leave and been handled by ssh?
Does docker context need these details?
From what I see in
DEBU[0000] commandconn: starting ssh with [-o ConnectTimeout=60 -l <user> -p <port> -- <domain> docker system dial-stdio] caller="/drone/src/pkg/upstream/commandconn/commandconn.go:49 New"couldn't the ssh command use the ssh config instead of-l <user> -p <port>?@moritz there are two needs here 1.
abra server add2. "general ssh connectivity"For 2. I think yes, let's try to drop all options and rely on the
.ssh/config, to be tested.For 1. this is what
abra server addruns under the hood:docker context create --docker host=ssh://<user>@<host>:<port> <host>and for that, we need those details. I don't know how to get them other than parsingssh -G ...or passing them as CLI flags. Ideas?@moritz can Docker connect to this server which requires
ProxyCommand?Yes it works also docker doesn't need all these details.
I just run:
docker context create myhostname --docker 'host=ssh://myhostname'And I configured
myhostnameinside the~/.ssh/configwithProxyCommand, a username and a different port and docker is able to connect.I think abra doesn't need to handle any connection details other than the hostname.
@decentral1se sounds like we can drop all options in both cases? 🤞
Oh dear dog, I've played us for absolute fools 😆 Will try rip it all out folks, thanks!
EDIT: trying to drum up some budget for this 🤑
decentral1se referenced this issue2024-06-20 07:04:58 +00:00
coop-cloud/abra#413