Message Boards Message Boards

Why is my SSH not authenticating?

Posted 4 years ago

Hi everyone,

I'm writing a bit confused because I've tried everything. I'm hoping for some ideas from people who know what they're doing a little more than me.

I'm trying to SSH into my Cyberpower PDU (device probably not important), which is connected to my computer running Windows 10 via Ethernet cable. I have enabled SSH communication on the device by logging into the IP address that I set it up on.

At first I thought that using RunProcess to connect to the IP address of the device and entering my computer log-in credentials would work, because that's how you usually log into your SSH server. Mathematica kept returning an error that my credentials were wrong, even though they weren't.

So then I tried using a keygen, which should be foolproof. Even when I generate a private key and tell Mathematica to use that file to connect to SSH, it still asks me for my computer log-in credentials, which it shouldn't! Because the SSH key should be enough.

Here's an example of the code I've been trying. (Ignore the fact that my SSH key is stored under a different user's folder - my computer wasn't wiped properly before being administered to me.) I also disguised my IP address below. This should be enough to SSH into the network I set up.

RemoteConnect[IPAddress["XXX.XXX.XX.XX"], 
 Authentication -> <|"Username" -> "Darren", 
   "SSHKey" -> File["C:\\Users\\chigozie\\.ssh\\id_rsa"]|>]

What could be wrong that Mathematica simply won't accept my log-in credentials or private key? And where might be a better place for me to post this question? Thank you!

Edit: I'll add that my tried to SSH in from Powershell, and my credentials were not accepted there either. They were, however, accepted when I used PuTTY.

POSTED BY: Darren Anthony
4 Replies
Posted 4 years ago

Crossposted here.

POSTED BY: Rohit Namjoshi
Posted 4 years ago

Are you able to SSH from the shell?

POSTED BY: Rohit Namjoshi
Posted 4 years ago

Actually no. I tried to SSH from Powershell and my credentials weren't accepted there either. They were, however, accepted when I set an SSH network using puTTY.

POSTED BY: Darren Anthony
Posted 4 years ago

Correction: after forcing my system to accept the required cipher types (aes12-cbc, 3des-cbc), I am now able to SSH from the shell. Huzzah. Mathematica still won't accept my private key or credentials however.

POSTED BY: Darren Anthony
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract