Score:0

I cannot create .ssh/authorized_keys on remote server

do flag

when I use ssh-copy-id it gives me the following error:

sh: 1: cannot create .ssh/authorized_keys: Directory nonexistent

I logged in with root@host and password to create .ssh/authorized_keys but every time it says:

touch: cannot touch 'authorized_keys': No such file or directory

I even changed the permission for .ssh directory. Still no success after I executed the following commands:

root@vmi698000:~# chmod 700 .ssh/
root@vmi698000:~# cd .ssh/
root@vmi698000:~/.ssh# touch authorized_keys
touch: cannot touch 'authorized_keys': No such file or directory
root@vmi698000:~/.ssh# cd ..
root@vmi698000:~# chmod 777 .ssh/
root@vmi698000:~# cd .ssh/
root@vmi698000:~/.ssh# touch authorized_keys
touch: cannot touch 'authorized_keys': No such file or directory
root@vmi698000:~/.ssh# ls -la
total 8
drwxrwxrwx 2 root root 4096 Oct 28 13:49 .
drwx------ 6 root root 4096 Oct 28 13:45 ..

I mention that I had access to the server using keys previously, but out of nowhere I cannot log in with ssh keys.

Can somebody help me with that?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.