tilde-lab / yascheduler

Yet another cloud computing scheduler for the high-throughput cloud scientific simulations
https://mpds.io/search/ab%20initio%20calculations
MIT License
5 stars 4 forks source link

Keys_dir should contain just private key #127

Open alinzh opened 11 months ago

alinzh commented 11 months ago

When I create a key using the commands:

ssh-keygen -t rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

the command yasetnode user@localhost returns next error:

/home/my_user_name/miniconda3/lib/python3.11/site-packages/asyncssh/public_key.py", line 3216, in import_private_key_and_certs 
    raise KeyImportError('Invalid private key') 
asyncssh.public_key.KeyImportError: Invalid private key

This error occurs because the .ssh/ directory contains both a private and public key. The AsyncSSH library processes all keys like a private (in decode_private), since the config file specifies the keys_dir path, and not path to a specific file with private key.

I think it should be stated in the documentation that keys_dir should store just private key.