mila-iqia / milatools

Tools to connect to and interact with the Mila cluster
MIT License
63 stars 12 forks source link

SSH connection issue on mila init #6

Closed semihcanturk closed 3 years ago

semihcanturk commented 3 years ago

The mila init command fails when attempting the SSH connection:

mila init                                 
Checking ssh config
There is no 'mila' entry in ~/.ssh/config. Create one? [Y/n] Y
What is your username?
> semih.canturk
The following code will be appended to your ~/.ssh/config:

Host mila
    HostName login.server.mila.quebec
    User semih.canturk
    PreferredAuthentications publickey,keyboard-interactive
    Port 2222
    ServerAliveInterval 120
    ServerAliveCountMax 5

Is this OK? [Y/n] Y
There is no '*.server.mila.quebec' entry in ~/.ssh/config. Create one? [Y/n] Y
The following code will be appended to your ~/.ssh/config:

Host *.server.mila.quebec
    HostName %h
    User semih.canturk
    ProxyJump mila

Is this OK? [Y/n] Y
Wrote ~/.ssh/config
# OK
Checking passwordless authentication
(local) $ ssh -oPreferredAuthentications=publickey mila 'echo OK'

ssh: connect to host login.server.mila.quebec port 2222: Operation timed out

Failed to connect to mila, could not understand error

OS: macOS Monterey (12.0.1) Python 3.8.11 milatools: 0.0.5

breuleux commented 3 years ago

Sorry for the delay! Is this still an issue?

The mila servers might sometimes get overloaded and time out, so it might work if you retry. If you run ssh -oPreferredAuthentications=publickey mila 'echo OK' directly, what does that do?

semihcanturk commented 3 years ago

Yep, this issue seems to be fixed! Thanks, and closing