SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Stupid question: is sshd even running on the phone?
No. That's the point of the 'reverse' part. You don't need to be running sshd on the target.
To take the phone out of the equation and thereby remove any doubt about its SSH implementation, I tried this between my laptop [running slackware64-14.0] and my desktop [running slackware-13.37] with the exact same result.
This tells me that there must be an incorrect setting on the machine which is running sshd. Aside from the changes mentioned in my prior post, I'm using the default slackware sshd_config.
The error message hints toward a PKI problem. I've tried copying keys between machines, but it doesn't make any difference, except that you don't have to enter a password to log in at step 1.
How do I get a reverse ssh session working in Slackware?
<Remote_Connection_Port> is the port to connect to sshd on the server (default is 22). You need to add a 'Port xxx' to /etc/ssh/sshd_config on the server if you use a port other than 22.
<Remote_Login_Port> is the port that will be used to connect back
<IDfile> is the private key for the user on the originating machine
The public key for the originating user needs to be in ~/.ssh/authorized_keys on the server.
The public key for the originating machine needs to be in ~/.ssh/known_hosts on the server. (This is found in /etc/ssh/ssh_host_rsa_key.pub on the originating machine if using RSA protocol.)
The public key for the connecting user needs to be in ~/.ssh/authorized_keys on the originating machine.
The public key for the connecting machine needs to be in ~/.ssh/known_hosts on the originating machine. (This is found in /etc/ssh/ssh_host_rsa_key.pub on the server if using RSA protocol.)
PS - I heavily use my reverse SSH tunnel. Thanks for the refresher! It is years since I set this up.
Yeah - but the other end of the tunnel, localhost:22, is not there. Since there is no sshd running your phone.
This is likely the exact problem. To test it, when doing the ssh client command on the phone, do it to the localhost on the phone itself to see if port 22 is listening. If the connection is refused, then you need to get an sshd app running. More than one app for that seems to be available.
with the command a remote 0.0.0.0:19999 socket is opened that is forwarded to localhost:22 of the machine that initiated SSH connection (your phone); you'd better answer my previous question because reverse SSH is wrong term
Specifies that the given port on the remote (server) host is to be forwarded to the given host and port on the local side. This works by allocating a socket to listen to port on the remote side, and whenever a connection is made to this port, the connection is forwarded over the secure channel, and a connection is made to host port hostport from the local machine.
Since you specify "localhost" for the "host" parameter, "host" is the ip address of your phone and "hostport" a port on your phone. So port 19999 on the server (your slackware box) is tunneled to port 22 on your phone. "local side" and "local machine" are your phone in this case.