On ssh Login Mechanics



(This may be as much a question about Unix login and process spawning mechanics as anything, but I discovered this in the course of doing some
ssh work, so ...)


I have an account on an internet-facing FreeBSD machine that is setup
primarily to be used when doing ssh port forwarding. This account
is setup to NOT permit shell access (the shell is setup to /sbin/nologin). Still, when I do this:

ssh -L port:address:port -N fowarding@xxxxxxxxxxxxxxxxxxxxxxxxxxx

The forwarding works fine. That is, ssh connects to the sshd daemon on
"freebsdmachine", authenticates using "forwarding"'s credentials, and
goes off to properly do the port:address:port forwarding *even though*
"forwarding" has no shell and it exits immediately after any login attempt.

So ... how in the world is this working at all? I'm guessing that the
connection to sshd precedes any login attempt. But I am mystified how,
having presented the credentials for "forwarding", the connection between ssh client and sshd remains in place, given that true login
is not taking place...
.



Relevant Pages

  • SUMMARY: how to set correct path?
    ... ven if we login with ssh. ... For BASH login shell, place the system wide ENV variables, such as PATH, ... You can set Use_login in the sshd_config to yes and restart sshd. ...
    (SunManagers)
  • Re: Hack attempt, best way to secure?
    ... Chris Mattern wrote: ... sshd login attempts over the last week or so. ... I can still access my system from anywhere as I have a couple of ssh ...
    (comp.security.ssh)
  • Re: SSH timeout settings
    ... My OpenSSH on my Free 4.4 Release box ... If you are using login with ssh, ... Within sshd itself: ... I'd use the sshd_config option and not login, but i don't use login w/ ...
    (FreeBSD-Security)
  • Re: ssh port forwarding - simple question
    ... :> from A to another machine B, and the mail server is on machine C... ... host the POP service, also has sshd demon enabled, right? ... you need to be able to login on that machine. ... I just tried your domain "ssh nextstep.org" and it appears that sshd is ...
    (comp.security.ssh)
  • Using PAM with ssh
    ... I'd like to login to a box of mine through ssh using a password that's ... stored in Samba's user database: for this I normally use pam_smb. ... pam_smb works with any other application, but not with sshd: ...
    (freebsd-questions)