I have installed OpenSSH on my jailbroken iPhone 5S, I am trying to set up ssh keys for it but I need to get to my /.ssh folder. I try to cd there while at root with cd ~/.ssh but it says "not a directory". I then tried mkdir ~/.ssh and get "cannot make directory: file exists". So once again I tried to cd ~/.ssh and still nada. I navigated to ~ and ls, and once again no .ssh directory.

$ ls -ad ~/.ssh
$ echo ~
  • .ssh seems to be a file, not a directory. Can you add the output of ls -ad ~/.ssh and echo ~ to your question? – nohillside Jan 3 '14 at 10:08
  • youre right it is indeed a file – cbalos Jan 3 '14 at 10:12
  • the directory didnt get created when I copied my key using scp it instead created .ssh as a file. Thanks – cbalos Jan 3 '14 at 10:13

Looks like .ssh is a file and not a directory. Either remove the file (rm ~/.ssh) or rename it (mv ~/.ssh ~/.ssh-strange) and set up your ssh keys again.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .