Closed marlens123 closed 8 months ago
Hey there @marlens123 , thanks for posting!
I'm familiar with this issue, I think this will be fixed by #93. A new release should come out soon that will include these changes.
Hi @lebrice, thanks for referring to this! I have tried ssh-keygen -t rsa -f {file_path} -N='{passphrase}'
as suggested in #93 and ensured that my local .pub and remote authorized_keys contain the same key (they do now, had to delete a '+' in the authorized_keys file), but still passwordless login is not working. Using git bash on Windows 11. not sure if I'm missing smth here...
Would you mind trying with just mila init
with the code of that PR?
pip uninstall milatools
pip install "git+https://www.github.com/lebrice/milatools@fix_sshkeys_passphrase"
mila init
Let me know if that works! :)
thanks for following up! This then finishes with: 'ssh-copy-id mila' appears to have failed!
. Though the key in authorized_keys now matches.
What command did you run?
mila init
Describe the bug
FileNotFoundError when trying to register public key.
Error Traceback
(mila) C:\Users\marle>mila init Checking ssh config Fixed the permissions on ssh directory at C:\Users\marle.ssh to 700 Fixing permissions on C:\Users\marle.ssh\config to 600 Did not change ssh config
OK
Checking passwordless authentication (local) $ ssh -oPreferredAuthentications=publickey mila 'echo OK' ? Your public key does not appear be registered on the cluster. Register it? Yes (local) $ 'powershell.exe type $env:USERPROFILE.ssh\id_rsa.pub | ssh mila "cat >> ~/.ssh/authorized_keys"'
Traceback (most recent call last): File "C:\Users\marle\miniconda3\envs\mila\lib\site-packages\milatools\cli\commands.py", line 68, in main mila() File "C:\Users\marle\miniconda3\envs\mila\lib\site-packages\milatools\cli\commands.py", line 362, in mila return function(*args_dict) File "C:\Users\marle\miniconda3\envs\mila\lib\site-packages\milatools\cli\commands.py", line 408, in init setup_passwordless_ssh_access() File "C:\Users\marle\miniconda3\envs\mila\lib\site-packages\milatools\cli\commands.py", line 445, in setup_passwordless_ssh_access here.run(command) File "C:\Users\marle\miniconda3\envs\mila\lib\site-packages\milatools\cli\local.py", line 34, in run return subprocess.run( File "C:\Users\marle\miniconda3\envs\mila\lib\subprocess.py", line 503, in run with Popen(popenargs, **kwargs) as process: File "C:\Users\marle\miniconda3\envs\mila\lib\subprocess.py", line 971, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\marle\miniconda3\envs\mila\lib\subprocess.py", line 1456, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] Das System kann die angegebene Datei nicht finden
Desktop (please complete the following information):
Additional context
milatools version=0.1.0 created new environment from within miniconda3
Thanks!