question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ERROR: unexpected error - Unable to decrypt PKCS#1 private key

See original GitHub issue

Bug Report

Description

While fetching the data from ssh-remote storage mentioned error is occurring, however while trying this on other machines and other remotes everything is working fine by simply providing the ssh password for authentication. below are the contents of dvc .config

[core]
    remote = storage
[remote "ssh-storage"]
    url = ssh://192.168.1.127/home/cemtrex/Core-Research-Experimentation
    user = cemtrex
    port = 22
    ask_password = true
    #password = ssh_password

Reproduce

After entering the correct ssh password below error appears.

$ dvc fetch -r ssh-storage

Enter a private key passphrase or a password for host '192.168.1.127' port '22' user 'cemtrex': 

ERROR: unexpected error - Unable to decrypt PKCS#1 private key                                                                                                                                

Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!

Expected

As a output to mentioned command the dvc should authenticate with ssh password as ask_password is set in dvc .config and all data artifacts should get downloaded from the remote ssh storage.

Environment information

Output of dvc doctor:

$ dvc doctor
DVC version: 2.8.1 (pip)
---------------------------------
Platform: Python 3.6.9 on Linux-5.4.0-128-generic-x86_64-with-Ubuntu-18.04-bionic
Supports:
        webhdfs (fsspec = 2021.10.0),
        http (aiohttp = 3.8.1, aiohttp-retry = 2.4.6),
        https (aiohttp = 3.8.1, aiohttp-retry = 2.4.6),
        s3 (s3fs = 2021.10.0, boto3 = 1.17.106),
        ssh (sshfs = 2021.11.2)
Cache types: hardlink, symlink
Cache directory: ext4 on /dev/nvme0n1p4
Caches: local
Remotes: s3, ssh
Workspace directory: ext4 on /dev/nvme0n1p4
Repo: dvc, git

Additional Information (if any):

I also tried running this with different dvc versions but still the same issue, it looks like something is wrong with the ssh settings configured in the O.S settings, but i am not able to figure it out exactly what causing the problem. I also referred to issue #3519 but still not able to figure it out.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
pmrowlacommented, Nov 24, 2022

@sudapure the current DVC release is 2.35.1, however DVC now requires Python 3.8 or later. It looks like you are still using 3.6, so you would be unable to update to newer versions of DVC unless you also update Python.

Closing this issue as stale. If you update Python and DVC and can still reproduce this issue in the latest release, feel free to re-open it, but otherwise we cannot provide support for older DVC releases (especially on Python 3.6).

0reactions
sudapurecommented, Nov 24, 2022

@dberenbaum i tried with newer dvc==2.10.2 and dvc[ssh]==2.10.2 versions, but problem still persists it’s working with older (2.0.5) version only.

Read more comments on GitHub >

github_iconTop Results From Across the Web

node-rsa errors when trying to decrypt message with private key
To answer your question @Curious_Programmer be default node-rsa uses pkcs1_oaep for encryption and decryption while jsencrypt uses pkcs1.
Read more >
SecKeyDecrypt returns errSecParam | Apple Developer Forums
Hi,. I am migrating my project from Xcode 10.1 to Xcode 11.4. One of the function in the project is to perform RSA...
Read more >
For valid PEM I get unable to load private key by openssh
The issue is that ssh-keygen generates an SSH key, while openssl rsa doesn't read SSH keys - it can read PKCS#1 or PKCS#8....
Read more >
RFC 3447 - Public-Key Cryptography Standards (PKCS) #1
r_u , u >= 2 (n, e) RSA public key p, q first two prime factors of the RSA ... 1 Error: "message...
Read more >
Attacks on RSA decryption and mitigation
If the attacker is able to somehow get the private key owner to decrypt this ... is decrypted, the "unpad" operation would undoubtedly...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found