Net::SS...sts_RSA(3)

πŸ“¦
version 2.144 Β· 4 versions
, in fedora 44

πŸ’… NAME

Net::SSH::Perl::Auth::Rhosts_RSA β€” bestie, this is the module that does Rhosts-RSA authentication. That's it, that's the whole job. ✨

This page lives in the User Contributed Perl Documentation section, and it's the manual for Net::SS...sts_RSA(3). πŸŽ€


🌸 SYNOPSIS

use Net::SSH::Perl::Auth;
my $auth = Net::SSH::Perl::Auth->new('Rhosts_RSA', $ssh);
print "Valid auth" if $auth->authenticate;

like. it's giving three lines and a dream. πŸ¦‹


✨ DESCRIPTION

Okay so Net::SSH::Perl::Auth::Rhosts_RSA performs Rhosts with RSA authentication against a remote sshd server. It's standard Rhosts authentication, plus a challenge-response phase where the server RSA-authenticates the client based on its host key. no cap, that's the whole vibe. πŸ”₯

When you create a new Rhosts_RSA auth object, you hand it an $ssh object. That object should contain an open connection to an ssh daemon, plus any data the authentication module needs to proceed. In this case? The $ssh object must contain the name of the user trying to open the connection. 🫢

So heads up bestie, the sshd server is gonna require two things from your client:

  1. Privileged Port πŸ’…

sshd will require your client to be running on a privileged port (below 1024). Which, in turn, will likely require your client to be running as root. If your client is not running on a privileged port, the Rhosts-RSA authentication request will be denied. periodt. 😭

If you're running as root, Net::SSH::Perl should automatically detect that and try to start up on a privileged port. If for some reason that isn't happening, take a look at the Net::SSH::Perl docs. πŸ‘‘

  1. Private Host Key πŸŽ€

In order to do RSA-authentication on your host key, your client must be able to read the host key. This will likely be impossible unless you're running as root, because the private host key file (/etc/ssh_host_key) is readable only by root.

not me having to explain the port thing twice, but fr fr it matters. πŸ™ˆ

With that aside, here's the actual flow, and it's kinda iconic:

  • To use Rhosts-RSA authentication, the client sends a request to the server to authenticate it, including the name of the user trying to authenticate, as well as the public parts of the host key. 🌈
  • The server first ensures that the host can be authenticated using standard Rhosts authentication (shosts.equiv, hosts.equiv, etc.). ⭐
  • If the client passes this test, the server sends an encrypted challenge to the client. 🧚
  • The client must decrypt this challenge using its private host key, then respond to the server with its response. πŸ”
  • Once the response has been sent, the server responds with success or failure. πŸ’€

πŸ’– AUTHOR & COPYRIGHTS

Please see the Net::SSH::Perl manpage for author, copyright, and license information. 🫢


and that's the whole page, bestie!! this little legend came from perl v5.42.0, dated 2026-01-17, in the User Contributed Perl Documentation section. slay, go authenticate something (on a privileged port, as root, obviously πŸ’…βœ¨).

πŸ“¦ where this page comes from