1. Authentication Failed error

Authentication Failed error

Home Forums FABRIC Educators Authentication Failed error

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #5772

    Hello, I came across another problem during the routing_with_IPv4 file, the same error occurs during the exploring IPv6 file. The error is. Any help will be greatly appreciated. Thank you.

    Fail: Authentication failed.

     

    • This topic was modified 1 year, 4 months ago by Ilya Baldin.
    #5773
    Luis Contreras
    Participant

      This may indicate that you may be having problems with the SSH key setup, have you tried running the “ConfigureEnviorment” and “HelloFabric” notebooks on the “

      #5787

      I ran the “ConfigureEnviroment” without any problems. As for the “HelloFabric” everything runs fine until Step 6 where I get an authenticationException: Authentication Failed error.

       

      ---------------------------------------------------------------------------
      AuthenticationException                   Traceback (most recent call last)
      Cell In[6], line 4
            1 #node = slice.get_node('Node1')
            3 for node in slice.get_nodes():
      ----> 4     stdout, stderr = node.execute('echo Hello, FABRIC from node hostname -s')
      
      File /opt/conda/lib/python3.10/site-packages/fabrictestbed_extensions/fablib/node.py:1542, in Node.execute(self, command, retry, retry_interval, username, private_key_file, private_key_passphrase, quiet, read_timeout, timeout, output_file)
         1537 logging.warning(
         1538     f"Exception in node.execute() (attempt #{attempt} of {retry}): {e}"
         1539 )
         1541 if attempt + 1 == retry:
      -> 1542     raise e
         1544 # Fail, try again
         1545 if self.get_fablib_manager().get_log_level() == logging.DEBUG:
      
      File /opt/conda/lib/python3.10/site-packages/fabrictestbed_extensions/fablib/node.py:1395, in Node.execute(self, command, retry, retry_interval, username, private_key_file, private_key_passphrase, quiet, read_timeout, timeout, output_file)
         1393 bastion = paramiko.SSHClient()
         1394 bastion.set_missing_host_key_policy(paramiko.AutoAddPolicy())
      -> 1395 bastion.connect(
         1396     self.get_fablib_manager().get_bastion_public_addr(),
         1397     username=bastion_username,
         1398     key_filename=bastion_key_file,
         1399 )
         1401 bastion_transport = bastion.get_transport()
         1402 bastion_channel = bastion_transport.open_channel(
         1403     "direct-tcpip", dest_addr, src_addr
         1404 )
      
      File /opt/conda/lib/python3.10/site-packages/paramiko/client.py:485, in SSHClient.connect(self, hostname, port, username, password, pkey, key_filename, timeout, allow_agent, look_for_keys, compress, sock, gss_auth, gss_kex, gss_deleg_creds, gss_host, banner_timeout, auth_timeout, channel_timeout, gss_trust_dns, passphrase, disabled_algorithms, transport_factory, auth_strategy)
          482 else:
          483     key_filenames = key_filename
      --> 485 self._auth(
          486     username,
          487     password,
          488     pkey,
          489     key_filenames,
          490     allow_agent,
          491     look_for_keys,
          492     gss_auth,
          493     gss_kex,
          494     gss_deleg_creds,
          495     t.gss_host,
          496     passphrase,
          497 )
      
      File /opt/conda/lib/python3.10/site-packages/paramiko/client.py:818, in SSHClient._auth(self, username, password, pkey, key_filenames, allow_agent, look_for_keys, gss_auth, gss_kex, gss_deleg_creds, gss_host, passphrase)
          816 # if we got an auth-failed exception earlier, re-raise it
          817 if saved_exception is not None:
      --> 818     raise saved_exception
          819 raise SSHException("No authentication methods available")
      
      File /opt/conda/lib/python3.10/site-packages/paramiko/client.py:794, in SSHClient._auth(self, username, password, pkey, key_filenames, allow_agent, look_for_keys, gss_auth, gss_kex, gss_deleg_creds, gss_host, passphrase)
          788 key = self._key_from_filepath(
          789     filename, pkey_class, passphrase
          790 )
          791 # for 2-factor auth a successfully auth'd key will result
          792 # in ['password']
          793 allowed_types = set(
      --> 794     self._transport.auth_publickey(username, key)
          795 )
          796 two_factor = allowed_types & two_factor_types
          797 if not two_factor:
      
      File /opt/conda/lib/python3.10/site-packages/paramiko/transport.py:1658, in Transport.auth_publickey(self, username, key, event)
         1655 if event is not None:
         1656     # caller wants to wait for event themselves
         1657     return []
      -> 1658 return self.auth_handler.wait_for_response(my_event)
      
      File /opt/conda/lib/python3.10/site-packages/paramiko/auth_handler.py:263, in AuthHandler.wait_for_response(self, event)
          261     if issubclass(e.__class__, PartialAuthentication):
          262         return e.allowed_types
      --> 263     raise e
          264 return []
      
      AuthenticationException: Authentication failed.
      #5789
      Ilya Baldin
      Participant

        Your *bastion* key is not properly set up. No other notebooks will execute properly until you can run this notebook all the way through. You can try to troubleshoot your setup – make sure that ~/work/fabric_config/fabric_rc file has a variable declaration FABRIC_BASTION_KEY_LOCATION that points to the correct file – this is the most likely problem.

        Alternatively you can regenerate a bastion key pair and try from the beginning:

        1. Please go to the FABRIC portal click Experiments -> Manage SSH keys
        2. Select the ‘Bastion’ tab and generate a new Bastion key pair.
        3. Download both the public and the private parts of the keypair
        4. Copy the private part of the key pair into the ~/work/fabric_config/ directory in your Jupyter Hub (assuming you are using the Jupyter Hub)
          • Note that in the file browser in Jupyter Hub ~/work/ is not visible, which is fine – you can simply select fabric_config and drag and drop the key file in there
        5. Re execute ‘Configure Environment’ notebook
          • Making sure to update the path to the bastion private key with the new name
        6. Re execute ‘Hello FABRIC’ notebook start to finish and make sure it completes

         

        #5848
        Yuvaraj Munian
        Participant

          During Configure the environment,

        Viewing 5 posts - 1 through 5 (of 5 total)
        • You must be logged in to reply to this topic.
        FABRIC invites nominations for four awards recognizing innovative uses of FABRIC resources—Best Published Paper, Best FABRIC Matrix, Best FABRIC Experiment, and Best Classroom Use of FABRIC — submissions due by **Monday, February 24 at 11:59 PM ET**, and winners announced at KNIT10. [>>>Submit Form](https://docs.google.com/forms/d/e/1FAIpQLSeTp3i2iDhB7bHgN8ryMxZci8ya87yjeQd7_JMZImUodNinVA/viewform)

        KNIT10 Call for Demos Now Open! Submit your demo by **February 24**. [>>>Submit Demo](https://docs.google.com/forms/d/e/1FAIpQLScRIWqHliNP3DFWBCnalYN_fBXJXVM0PpP9YWWJdSebC95TvA/viewform)
        FABRIC invites nominations for four awards recognizing innovative uses of FABRIC resources—Best Published Paper, Best FABRIC Matrix, Best FABRIC Experiment, and Best Classroom Use of FABRIC — submissions due by **Monday, February 24 at 11:59 PM ET**, and winners announced at KNIT10. [>>>Submit Form](https://docs.google.com/forms/d/e/1FAIpQLSeTp3i2iDhB7bHgN8ryMxZci8ya87yjeQd7_JMZImUodNinVA/viewform)

        KNIT10 Call for Demos Now Open! Submit your demo by **February 24**. [>>>Submit Demo](https://docs.google.com/forms/d/e/1FAIpQLScRIWqHliNP3DFWBCnalYN_fBXJXVM0PpP9YWWJdSebC95TvA/viewform)