Run ssh/scp without .ssh directory or with alternate dir?

Solution 1:

I think you could try to do

ssh -o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null" user@server

it could work as it won't try do check for a server key... (i have not try this myself)

(inspired from https://stackoverflow.com/questions/1655815/ssh-on-linux-disabling-host-key-checking-for-hosts-on-local-subnet-known-hosts)