Hacker News new | ask | show | jobs
by dsissitka 662 days ago
This is one of those things I like to verify:

  david@desktop:~$ nmap -p 22 --script ssh-auth-methods becomesovran.com
  Starting Nmap 7.92 ( https://nmap.org ) at 2024-08-25 23:31 EDT
  Nmap scan report for becomesovran.com (162.213.255.209)
  Host is up (0.066s latency).
  rDNS record for 162.213.255.209: server1.becomesovran.com

  PORT   STATE SERVICE
  22/tcp open  ssh
  | ssh-auth-methods:
  |   Supported authentication methods:
  |     publickey
  |     gssapi-keyex
  |     gssapi-with-mic
  |     password
  |_    keyboard-interactive

  Nmap done: 1 IP address (1 host up) scanned in 0.86 seconds
  david@desktop:~$
As far as I can tell AuthenticationMethods publickey is the right way to do it these days but I'd love to know if that's not the case.
1 comments

I've just been doing

    ssh -v localhost echo 2>&1 | grep continue
(obviously replacing "localhost" with whatever server you want, and you can put anything you want where "echo" is but that's the best no-op I've come up with)
The best no-op, if there is such a thing, is probably `:` or `true`.
Oh nice, `:` does work:) I thought that wouldn't work because it was a shell built-in. Thanks!