Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 28 |
Nodes: | 6 (1 / 5) |
Uptime: | 46:37:05 |
Calls: | 422 |
Files: | 1,024 |
Messages: | 90,362 |
when i type ssh and two tabs i get a list of host
numeric and names
where do they come from
when i type ssh and two tabs i get a list of host
numeric and names
where do they come from
when i type ssh and two tabs i get a list of host
numeric and names
where do they come from
when i type ssh and two tabs i get a list of host
numeric and names
where do they come from
On Fri, 16 May 2025 14:56:41 +0000
fxkl47BF@protonmail.com wrote:
when i type ssh and two tabs i get a list of host
numeric and names
where do they come from
If I type 'ssh<tab><tab>' I get proposed tab completions of various
programs, all starting with ssh.
If I type 'ssh<space><tab><tab>' I get proposed IP addresses and host
names as arguments to ssh. The seem to be hosts on my local network,
hosts I have in ~/.ssh/config>, and some I don't recognize.
as an aside
in known_hosts there are many key fingerprints with no host identification
is there a way to identify what host the fingerprint is for
On Fri, May 16, 2025 at 04:09:10PM +0000, fxkl47BF@protonmail.com wrote:
[...]
as an aside
in known_hosts there are many key fingerprints with no host identification >> is there a way to identify what host the fingerprint is for
The file format is described in man 8 sshd.
Those with "no host identification" most probably just have a hashed host name: the idea is that an attacker who gets access to your user account doesn't get a neat list of which hosts to try next.
There is an (sshd, I think) option to change that.
fxkl47BF@protonmail.com wrote:
when i type ssh and two tabs i get a list of host
numeric and names
where do they come from
Assuming you are using bash (or another shell that does TAB
completion) I think it's probably just a list of file and directory
names in the current directory.
Try doing the same in a different directory.
On Fri, 16 May 2025, tomas@tuxteam.de wrote:
above negation or wildcard operators may be applied.There is an (sshd, I think) option to change that.
i see
Alternately, hostnames may be stored in a hashed form which hides host names and addresses should the file's contents be disclosed. Hashed hostnames start with a ‘|’ character. Only one hashed hostname may appear on a single line and none of the
i don't see how to change it
On Fri, May 16, 2025 at 06:32:16PM +0000, fxkl47BF@protonmail.com wrote:above negation or wildcard operators may be applied.
On Fri, 16 May 2025, tomas@tuxteam.de wrote:
[...]
There is an (sshd, I think) option to change that.
i see
Alternately, hostnames may be stored in a hashed form which hides host names and addresses should the file's contents be disclosed. Hashed hostnames start with a ‘|’ character. Only one hashed hostname may appear on a single line and none of the
i don't see how to change it
Ah, no,, sorry. I lied to you, it's in the ssh_config (/etc/ssh/ssh_config). Here's the extract from man ssh_config:
HashKnownHosts
Indicates that ssh(1) should hash host names and ad‐
dresses when they are added to ~/.ssh/known_hosts.
These hashed names may be used normally by ssh(1) and
sshd(8), but they do not visually reveal identifying
information if the file's contents are disclosed.
The default is no. Note that existing names and ad‐
dresses in known hosts files will not be converted
automatically, but may be manually hashed using
ssh-keygen(1). Use of this option may break facili‐
ties such as tab-completion that rely on being able
to read unhashed host names from ~/.ssh/known_hosts.
...and the default in Debian is:
tomas@caliban:~$ grep -i hash /etc/ssh/ssh_config
HashKnownHosts yes
...so there you are :)
On Fri, 16 May 2025, tomas@tuxteam.de wrote:
thanks
i understand the no host hash in an industrial setting
but in a home network it seems unnecessary
and i also see it looks in ~/.ssh/known_hosts
i also have several i don't recognize
and it is quite rare to SSH into localhost.
On Fri, May 16, 2025 at 16:39:15 +0100, Chris Green wrote:
fxkl47BF@protonmail.com wrote:
when i type ssh and two tabs i get a list of host
numeric and names
where do they come from
Assuming you are using bash (or another shell that does TAB
completion) I think it's probably just a list of file and directory
names in the current directory.
Try doing the same in a different directory.
No, it's almost certainly programmable completion from the bash-completion package.
It's installed and used by default in Debian.
It may be installed, but I've always had to use:
[ -f /etc/bash_completion ] && . /etc/bash_completion # Use bash-completion if available
in order for it to work:
$ grep -A8 'bash completion' /etc/bash.bashrc
# enable bash completion in interactive shells
#if ! shopt -oq posix; then
# if [ -f /usr/share/bash-completion/bash_completion ]; then
# . /usr/share/bash-completion/bash_completion
# elif [ -f /etc/bash_completion ]; then
# . /etc/bash_completion
# fi
#fi
$
What file does in Linux use to the store network address in?
What file does in Linux use to the store network address in?
If you mean "what file contains the IP address and hostname of my own server?": It depends whether you use NetworkManager to configure networking or the older style.
In the older style the config file goes in /etc/sysconfig/network-scripts
and contains the NIC name as part of the filename. With NetworkManager the file has a different format and name and goes in /etc/NetworkManager/connection-scripts.
There are command-line tools to configure NetworkManager-style like nmtui
and nmcli if you reject GUIs ;-) You may need to install one of them if not already.