Use the same machine as a client and server for SSH

sftp

For development tests, I need to setup an SFTP server. So I want to know if it's possible to use the same machine as the client and the server. I tried and I keep getting this error:

Permission denied (publickey).
Connection closed

Best Answer

The short answer:

cat ~/.ssh/id_rsa.pub >>~/.ssh/authorized_keys