Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm inside chroot, and everytime I scp it keeps telling me:

bash-4.2$ scp user@example.com:somefile .
Could not create directory '/.ssh'.
Host key verification failed.

Obviously, I have no means to create "/.ssh" dir either, also I've tried to

export HOME=/private/

(Private dir is user only writable/readable) but it throws same error, that it can't create "/.ssh" so it doesn't even change the path it is trying to create, it always tries to create "/.ssh".

How can I ignore or change the "/.ssh" directory of scp/ssh commands?

share|improve this question

1 Answer 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 http://stackoverflow.com/questions/1655815/ssh-on-linux-disabling-host-key-checking-for-hosts-on-local-subnet-known-hosts)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.