LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Midnight Commander can not establish SSH connections (https://www.linuxquestions.org/questions/linux-software-2/midnight-commander-can-not-establish-ssh-connections-4175601647/)

WaterCatapult 03-13-2017 02:43 AM

Midnight Commander can not establish SSH connections
 
Good morning,

I have the strange issue on one of my systems that midnight commander can't establish a connection to other systems using SSH.
Trying to do so results in the standard feedback message that access got denied although I certainly entered the correct IP address and port number.

Can't mc by any chance handle keys properly?
All my Linux using computers are set to allow connections from systems when using the correct SSH key.

Doing a Startpage research don't help much, it seems like I'm in an unique situation that no one else encountered before :(

Turbocapitalist 03-13-2017 03:26 AM

I'm not sure which version handles keys, but I think it was a while back and anything recent will work. Version 4.8.13 at least handles keys at least. You do have to have the agent available to mc however. Can you connect using keys with your regular SSH client from the same shell as you would launch mc?

Code:

ssh 203.0.113.48
If not, then the problem is not with mc and lies elsewhere. Which desktop environment are you using mc in?

WaterCatapult 03-13-2017 04:33 AM

Quote:

Originally Posted by Turbocapitalist (Post 5682765)
I'm not sure which version handles keys, but I think it was a while back and anything recent will work. Version 4.8.13 at least handles keys at least. You do have to have the agent available to mc however. Can you connect using keys with your regular SSH client from the same shell as you would launch mc?

Any other programs show no problems connecting, no matter what machine, no matter what DE.
As a workaround of some sort I'm using either scp or sftp to achieve my goals but depending on what these are or where I am connecting from this can be quite annoying.

Quote:

Originally Posted by Turbocapitalist (Post 5682765)
If not, then the problem is not with mc and lies elsewhere. Which desktop environment are you using mc in?

Depending on the system it's either Plasma5 or MATE... at least when using GNU/Linux.

Turbocapitalist 03-13-2017 04:39 AM

What version of Midnight Commander do you have? How are you launching it? What is the content of the relevant environment variables?

Code:

set | grep '^SSH'
With SSH_AUTH_SOCK set automatically, I can launch mc from a terminal in XFCE, for example, and it will connect using the key I have already loaded into the agent.

WaterCatapult 03-13-2017 03:26 PM

Quote:

Originally Posted by Turbocapitalist (Post 5682780)
What version of Midnight Commander do you have? How are you launching it? What is the content of the relevant environment variables?

As Debian Stable is the oldest base, at least v4.8.13 - always installed from official repos.
In case of Raspbian and Mint 18.1 it might be newer but is still from their repository.

Quote:

Code:

set | grep '^SSH'

I don't know what the expected results are, as my system's are German all I can say is that the output is mentioning matches in the binary file.

Nothing else otherwise.

Quote:

Originally Posted by Turbocapitalist (Post 5682780)
With SSH_AUTH_SOCK set automatically, I can launch mc from a terminal in XFCE, for example, and it will connect using the key I have already loaded into the agent.

Call me stupid but where to set said parameters? :(


Kind regards,
WaterCatapult

Turbocapitalist 03-14-2017 01:52 AM

The variable names have have nothing to do with localization to German. The output should have been something like this, or at least the bottom line:

Code:

$ set | grep '^SSH'
SSH_AGENT_PID=2672
SSH_AUTH_SOCK=/tmp/ssh-nICxD7RuiTti/agent.2619

If your desktop environment doesn't have at least $SSH_AUTH_SOCK set, then that is the problem, not mc itself.

Under normal circumstances your desktop environment sets launches an agent and sets the variable(s) needed to connect to it before it starts up.

I suppose since the other programs can connect that your desktop environment has an agent running?

I'm not so familiar with MATE. Which terminal emulators do you have available for it and do you have the same lack of $SSH_AUTH_SOCK in all of them?


All times are GMT -5. The time now is 01:39 AM.