lavv17 / lftp

sophisticated command line file transfer program (ftp, http, sftp, fish, torrent)
http://lftp.yar.ru
GNU General Public License v3.0
1.1k stars 161 forks source link

lftp no longer recognizes hostnames defined in the ssh config file #588

Closed rpgdev closed 4 years ago

rpgdev commented 4 years ago

From the lftp terminal I used to be able to call open [hostname defined in ~/.ssh/config] and it would prompt me for the passphrase of the key associated with that hostname and connect to it. If there was already a ssh connection established to that host lftp would open it right away. This is not the behavior I'm seeing right now and I don't remember having done anything in particular to get that behavior in the past. What should I do to get it back? I just updated my system (Fedora 32) so that might be the cause.

LFTP | Version 4.9.1 Libraries used: GnuTLS 3.6.13, idn2 2.3.0, Readline 8.0, zlib 1.2.11

lavv17 commented 4 years ago

Please try plain ssh to the host and send me the prompt for a passphrase. Maybe the prompt has changed so that lftp cannot recognize it.

rpgdev commented 4 years ago

Please try plain ssh to the host and send me the prompt for a passphrase. Maybe the prompt has changed so that lftp cannot recognize it.

That was the first thing I tried because that's what I needed to do to get lftp to automatically login to the host but now lftp doesn't even recognizes the hostname at all. Before even if I hadn't logged in lftp asked me for the key's passphrase. Now it just doesn't recognize the hostname at all. This is what I get open: hostname: Name or service not known

lavv17 commented 4 years ago

Please enable debug in lftp to see the exact ssh command being used.

On Thu, 7 May 2020 at 15:54, rpgdev notifications@github.com wrote:

Please try plain ssh to the host and send me the prompt for a passphrase. Maybe the prompt has changed so that lftp cannot recognize it.

That was the first thing I tried because that's what I needed to do to get lftp to automatically login to the hostname but now lftp doesn't even recognizes the hostname at all. Before even if I hadn't logged in lftp asked me for the key's passphrase. Now it just doesn't recognize the hostname at all. This is what I get open: hostname: Name or service not known

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/lavv17/lftp/issues/588#issuecomment-625237492, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHLWXGEH4LLSFMFRTANL7LRQKVRXANCNFSM4M26RTQA .

-- Alexander.

rpgdev commented 4 years ago

Please enable debug in lftp to see the exact ssh command being used.

I hit debug in the lftp terminal and then:

> open sshconfighost
---- Resolving host address...
---- IPv6 is not supported or configured
open: sshconfighost: Name or service not known

Is there a way to get more detailed logs? Not clear from documentation

lavv17 commented 4 years ago

Try open sftp://sshhost

On Thu, 7 May 2020 at 22:24, rpgdev notifications@github.com wrote:

Please enable debug in lftp to see the exact ssh command being used.

I hit debug in the lftp terminal and then:

open sshconfighost ---- Resolving host address... ---- IPv6 is not supported or configured open: sshconfighost: Name or service not known

Is there a way to get more detailed logs? Not clear from documentation

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lavv17/lftp/issues/588#issuecomment-625449986, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHLWXC6QXKRLDAO6GEFGTTRQMDHTANCNFSM4M26RTQA .

-- Alexander.

rpgdev commented 4 years ago
$ lftp
:ftp [~]
> debug
:ftp [~]
> open sftp:sshhost
---- Resolving host address...
open: sshhost: no such tcp service         
:ftp [~]
> 

ssh sshhost is what I used to login from the terminal and it works.

lavv17 commented 4 years ago

The double slash is important

On Fri, 8 May 2020 at 16:09, rpgdev notifications@github.com wrote:

$ lftp :ftp [~]

debug :ftp [~] open sftp:sshhost ---- Resolving host address... open: sshhost: no such tcp service :ftp [~]

ssh sshhost is what I used to login from the terminal and it works.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lavv17/lftp/issues/588#issuecomment-625807727, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHLWXGJ6DNNPMMSIOYCGNDRQQACLANCNFSM4M26RTQA .

-- Alexander.

rpgdev commented 4 years ago

My bad. It did enter using sftp://sshhost, why is the protocol required now?

lavv17 commented 4 years ago

I don’t know, maybe you have used to set cmd:default-protocol before.

On 8 May 2020, at 18:20, rpgdev notifications@github.com wrote:

 My bad. It did enter using sftp://sshhost, why is the protocol required now?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

rpgdev commented 4 years ago

Not really no, I was using the same config file I always have. I just added it to the .lftprc file because it's closer to how lftp used to behave by default (seemingly). In a different note, lftp is taking me to the root folder of the host but it used to take me to a particular folder even though I just ran open sshhost is there a way to get that behavior back? In lftp 4.6 this is the behavior I still get and looking at its .lftprc doesn't suggest any change I should make on the machine I'm running 4.9. How can I get that behavior back without having to add the path to the open command?

lavv17 commented 4 years ago

Do you have a bookmark with the same name?

— Alexander.

On 8 May 2020, at 21:33, rpgdev notifications@github.com wrote:

 Not really no, I was using the same config file I always have. I just added it to the .lftprc file because it's closer to how lftp used to behave by default (seemingly). In a different note, lftp is taking me to the root folder of the host but it used to take me to a particular folder even though I just ran open sshhost is there a way to get that behavior back? In lftp 4.6 this is the behavior I still get and looking at its .lftprc doesn't suggest any change I should make on the machine I'm running 4.9. How can I get that behavior back without having to add the path to the open command?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

rpgdev commented 4 years ago

Yep, that was it :D I set them up so long ago I forgot about it completely and thought lftp was using the ssh config hosts when I issued the open commands and not the bookmark name. Thank you!