ElMariachi2021 Posted February 15, 2022 Posted February 15, 2022 Hello! I have Ambian Bullseye running on an Orange Pi Pus 2E. On my Linux-Notebook with Manjaro I can easily complete hostnames using TAB. This does not work on Armbian. Is there a package I need to install? Or a configuration I need to change? Thank you!
ElMariachi2021 Posted March 2, 2022 Author Posted March 2, 2022 I have found a script here, but even this doesn't work, because "~/.ssh/config" doesn't exist on Armbian.
Igor Posted March 2, 2022 Posted March 2, 2022 On 2/15/2022 at 2:49 AM, ElMariachi2021 said: This does not work on Armbian. Choose ZSH at first login or change in armbian-config. And you will have the same shell.
ElMariachi2021 Posted March 2, 2022 Author Posted March 2, 2022 Hello! I have switched to zsh, but still I don't get more choice than before: Zitat mediaserver:~:# ssh roo�t@ mediaserver:~:# mediaserver:~:# mediaserver:~:# ssh root@mediaserver <TAB> ip6-localhost ip6-loopback localhost mediaserver "mediaserver" is the Armbian system itself. What I expect is to also have the other hosts in my network availaible, like "router, elite, prtsrv, ..." Like it is on my Manjaro-Notebook: Zitat [ladmin@elite~]ssh root@ root@::1 root@esxi <TAB> root@192.168.100.1 root@ff02::1 root@192.168.1.1 root@ff02::2 root@192.168.1.20 root@ip6-allnodes root@192.168.1.22 root@ip6-allrouters root@192.168.1.24 root@ip6-localhost root@192.168.1.31 root@ip6-loopback root@192.168.1.34 root@localhost root@192.168.1.50 root@opp2e root@192.168.1.61 root@mediaserver root@192.168.1.66 root@prtsrv root@192.168.1.69 root@router root@192.168.1.70 root@server root@192.168.1.91 root@truenas I don't know how the names of my other hosts got into that completion list as I did not add them manually. I think they probably have gotten in there automatically by DNS, as they always are available. Een when adding a new host to my LAN it's directly available as an completion option. Thank you for all your help!
Igor Posted March 2, 2022 Posted March 2, 2022 12 minutes ago, ElMariachi2021 said: I don't know how the names of my other hosts got into that completion list as I did not add them manually. I think they probably have gotten in there automatically by DNS, as they always are available. Een when adding a new host to my LAN it's directly available as an completion option. I don't know what is missing. Try to find out and we can add that for the future.
ElMariachi2021 Posted March 2, 2022 Author Posted March 2, 2022 Hello! I found the reason: It simply is the default configuration in "/etc/ssh/ssh_config". There's the line " HashKnownHosts yes", which probably is supposed to make SSH a little more secure. I don't really see a problem with having the LAN's other hostnames available, and the hashing will prevent SSH hostname completion from working, as the hostnames have to be read from the ssh config files for this to work. So it would be nice, if armbian-config had an option to "Enable SSH remote hostname completion" with a note that this will lead to config files including clear readable hostnames (which in advance will set " HashKnownHosts no". Also the existing file ~/.ssh/known_hosts" has to be deleted for SSH to recreate it with non-hashed hostnames. Alternatively this behaviour can be overriden for the current user having a local configuration file "~/.ssh/config" with the contents: Zitat Host * HashKnownHosts no And the file permissions: 600
Recommended Posts