Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatible with OpenSSH wildcard HostName #10323

Closed
cyberduck opened this issue May 15, 2018 · 2 comments
Closed

Incompatible with OpenSSH wildcard HostName #10323

cyberduck opened this issue May 15, 2018 · 2 comments
Labels
enhancement low priority sftp SFTP Protocol Implementation

Comments

@cyberduck
Copy link
Collaborator

f2a979c created the issue

I have these rules set up in my .ssh/config:

Host *.*
HostName %h

Host *
HostName %h.myservers.com

This allows me to connect via the command line to subdomains of myservers.com without having to spell it out. For example:

ssh foo    # connects to foo.myservers.com

Yet a connection to foo.bar.com will still go straight through as normal because OpenSSH will match the first Host *.* block and stop there. This isn't handled correctly by Cyberduck, though. Trying to connect via SFTP to foo.bar.com will return the following error:

DNS lookup for %h.myservers.com failed. DNS is the network service that translates a server name to its Internet address. This error is most often caused by having no connection to the Internet or a misconfigured network. It can also be caused by an unresponsive DNS server or a firewall preventing access to the network.
@BenJetson
Copy link

I have quite a few of these rules in my ~/.ssh/config and this makes Cyberduck hard to use for me.

For example:

Host box*
  HostName %h.server.internal.somewhere.net

Host transfer*
  HostName access.%h-sftp.internal.somewhere.net

Is this something that is being worked on? If not, would pull requests be accepted for this issue?

@AliveDevil
Copy link
Contributor

AliveDevil commented Aug 3, 2022

Pull Requests are always welcome.
This isn’t something we are actively working on.
Only direct hostname matches are considered, as far as I can tell. If you want to give this a shot yourselves here are some entrypoints:

https://github.com/iterate-ch/cyberduck/blob/master/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/config/transport/OpenSshConfig.java

Looks like „the only“ missing piece is the hostname replacement, looking at the previous ticket reference.

@dkocher dkocher closed this as completed Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement low priority sftp SFTP Protocol Implementation
Projects
None yet
Development

No branches or pull requests

4 participants