Warning! Try this on non-essential account first because if you make a mistake in the command you may lose an access to the remote system.
If you use keys for SSH login then you can change path by prepending
command= to before a key in
~/.ssh/authorized_keys on your remote server. Example:
command="cd /var/www/websites ; /bin/bash -l" ssh-rsa AAA.....rest of the key
It is fine to generate and use multiple keys for the same user. One key on the server may contain the command the other may not - this way you select expected behaviour at login time. You can simply wrap it up with local
IdentityFile ~/.ssh/<key1> #on the server key with "command"
IdentityFile ~/.ssh/<key2> #on the server key without command
This is what will occur:
local$ ssh websites-my-host
local$ ssh my-host