ssh HOME environment variable

Code:
# mkdir /test
# setenv HOME /test
# ssh -v localhost

OUTPUT:
Code:
OpenSSH_5.8p2_hpn13v11 FreeBSD-20110503, OpenSSL 0.9.8q 2 Dec 2010
...
debug1: Trying private key: /root/.ssh/id_rsa
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Trying private key: /root/.ssh/id_ecdsa
...

How to change $HOME for ssh?
 
Change the user you login as via the ssh command:
$ ssh someuser@localhost
IOW, create a "test" user, with "/test" as the home directory. Then login via SSH as user "test".
 
A remote user and remote home folder do not interest me. I need to specify a special path for known_hosts file. I was hoping for a change of variable $HOME.
 
If you're trying to do is supply a different known_hosts file, there's an easier way to do it:

Code:
ssh -o UserKnownHostsFile=/path/to/other/known_hosts -v localhost
 
Back
Top