I have a home client I would like to connect to over SSH from my remote Ubuntu server. currently I create a cron job that persistently calls out from my home client to my remote server.
So far I have tried: ssh -R 2222:localhost:22 root@<server-ip> -p 2222
and ssh -L 2222:localhost:22 root@<server-ip> -p 2222
in a cron job.
I listen on the server using nc -lvnp 2222
and I get a connection message saying Connection received on 104.136.5.228 63119 SSH-2.0-OpenSSH_8.8p1 Debian-1
I have also tried using the private key of my server to login through SSH. From the client: ssh-copy-id root@<server-ip>
and ssh -i id_rsa root@<server-ip>
.
Server response: root@<server-ip>: Permission denied (publickey).
But a reverse shell does not present itself. Any help in the right direction is greatly appreciated.