0

I have this weirdest error where a single IP address with ssh would immediately return an error

arthur@arthur-laptop:~$ ssh 192.168.1.85
tilde_expand: No such user .ssh

I feel like it's an issue with autocompletion or something similar. And I have no idea where to look to fix this.

A few info points :

  • The error does not show up when running the command as root
  • The error does not show up when using any other IP address (it only fails for 192.168.1.85)
  • which ssh returns /usr/bin/ssh
  • There is no weird aliases in .bash_aliases, nor in .bash_profile nor in bash_logout

I'm clueless. This is obviously a weird alias set up somewhere, but I have no idea where to look. Any clue ?

1 Answers1

2

The error message tilde_expand: No such user .ssh sounds like ssh is trying to expand ~.ssh, rather than presumably ~/.ssh.

I would check ~/.ssh/config and /etc/ssh/ssh_config (or alternative ssh configuration files) for typos of paths.

Torin
  • 1,703
  • Spot on. I had no idea I had a .ssh/config file laying around, probably a bad copy/paste. Indeed it contained something like IdentityFile ~.ssh/id_rsa_server. – Arthur Attout Mar 25 '23 at 22:09
  • @ArthurAttout this kind of error always means you forgot a / somewhere. The trick is in finding it... – RonJohn Mar 25 '23 at 22:51