I know that  I can create shortcuts for specific users/servers on the client side via ~/.ssh/config or /etc/ssh/ssh_config, but I would like to do something similar but on the server side. That is, when I issue on the client: ssh pub@name.server.topI am actually chrooted to/home/jon/pubon name.server.top where I will use sftp. In /etc/ssh/sshd_config I have seen examples as the  following:Subsystem sftp internal-sftpMatch user pub    ChrootDirectory %h    ForceCommand internal-sftp    AllowTcpForwarding noWill also the following  work?    ChrootDirectory /home/jon/pubIs it possible to create the pub as a sort of virtual user? That is, the remote user logs as pub and  his public key is in /home/jon/.ssh/authorized_keys, so without the hassle of creating a separate /home/pub/.ssh/authorized_keys or the /home/pub directory at all.
Redirect SSH user server side
ssh;users;sshd
I tested this in a virtual machine context: the SSH server is Cygwin (also VM host); the client is Arch Linux SSH (also VM guest).I used the following script.I am not chrooting so I don't need to copy any binaries in the shared folder, only to copy the public key. Anyway I think that, using the internal-sftp (not SSH), binary requirements should be reduced.#!/bin/sh      ## Setup SFTP access on server side## using an alias user and to a subdir of the aliased user home## ------------------------------------------------------------## Customise## Shared path inside the aliased user homesharedpath=/home/jon/pub## Aliased user namealtuser=pub## Path to the public key of aliased userpubkey=~/.ssh/pub_rsa.pub## Add aliased user to /etc/passwduser=`grep ^$USER /etc/passwd`txt=$altuser:`echo $user | cut -d: -f2-5` txt=$txt:$sharedpath:`echo $user | cut -d: -f7` echo  $txt>>/etc/passwd## Set user rules in sshd_configtxt=Match User $altuser    ForceCommand internal-sftp    AllowTcpForwarding no    X11Forwarding noecho $txt >>/etc/ssh/sshd_config## Copy the public key in the shared folder mkdir -p $sharedpath/.sshcp  $pubkey $sharedpath/.ssh/## Format sftp lineecho You can now run on the client (adjust paths accordingly): echo sftp -i ${pubkey%.*} $altuser@name.server.top