type 'man ssh' and you will see :-
ssh (SSH client) is a program for logging into a remote machine and for
executing commands on a remote machine. It is intended to replace rlogin
and rsh, and provide secure encrypted communications between two
untrusted hosts over an insecure network. X11 connections and arbitrary
TCP/IP ports can also be forwarded over the secure channel.
'man sshd' will give you more info on running the daemon which you will need to do on your Gentoo box such as
" sshd (SSH Daemon) is the daemon program for ssh(1). Together these pro_
grams replace rlogin and rsh, and provide secure encrypted communications
between two untrusted hosts over an insecure network. The programs are
intended to be as easy to install and use as possible.
"
Source code and more info at
http://www.openssh.com/
HTH
lesleyb