If the login is on a tty, and no command has been specified, prints:
If the login is on a tty, records login time.
Checks /etc/nologin; if it exists, prints contents and quits (unless root).
Changes to run with normal user privileges.
Sets up basic environment.
Reads the file ~/.ssh/environment, if it exists, and users are allowed to change their environment. See the PermitUserEnvironmentoption in
sshd_config
Changes to user's home directory.
If ~/.ssh/rc exists and the sshd_config(5) PermitUserRC option is set, runs it; else if /etc/ssh/sshrc exists, runs it; otherwise runs xauth. The “rc” files are given the X11 authentication protocol and cookie in standard input. See SSHRC, below.
Runs user's shell or command. All commands are run under the user's login shell as specified in the system password database.