1. No such file or directory

No such file or directory

Home Forums FABRIC General Questions and Discussion No such file or directory

Tagged: 

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #954
    Austin Kim
    Participant

      In the hello_fabric jupyter notebook when I run the “Log into Nodes” code block I get this error.

      “[Errno 2] No such file or directory: ‘/home/fabric/.ssh/id_rsa_fabric'”

      The only thing I’ve added to the code is my bastion username. Is there something else I need to do to make this notebook run?

      #955
      Paul Ruth
      Keymaster

        You will need to put your private key in the Jupyter container at that path (or some whereelse and change the path in the notebook).

        You can think of the Jupyter container as a personal computer in the “cloud”.  The benefit is that it comes mostly configured for FABRIC.   The only thing you need to do is add your bastion key.

        Another option is to install the FABRIC API on your personal machine (laptop, etc.).  There are some instructions for that here: https://learn.fabric-testbed.net/knowledge-base/install-the-python-api/

        Paul

        #972
        POLINA LYUBAVINA
        Participant

          silly question, Paul, but for the noobs here how do you put your private key into the Jupyter container at the path if it’s in the browser?

          #974
          Austin Kim
          Participant

            Just for a quick testing of logins with the keys directly into the servers and through bastion host,
            I created a test server at 128.194.6.201 and inserted UTAH people’s keys into accounts (same usernames for FABRIC) and they can log into this server directly with their ssh-keys.

            eg.
            ssh -i <SSH_KEY_PRIVATE_PORTION> austinhk_0051496666@128.194.6.201

            Once they can login to this server, next step can be to test logins through the bastion host.
            eg.
            ssh -i <SSH_KEY_PRIVATE_PORTION> -J austinhk_0051496666@bastion-1.fabric-testbed.net austinhk_0051496666@128.194.6.201

            If they are able to log in, they can also view the public key we insert to these servers (bastion host and the test server)

            eg.
            [austinhk_0051496666@Node0 ~]$ cat .ssh/authorized_keys
            ssh-rsa
            < your public key should show here >

            ^ I went through this process and successfully got my public key

            #983
            Paul Ruth
            Keymaster

              To answer Polina’s question… No, we have not installed you private key in the Jupyter environment (we never had access to your private key).

              More detail can be found in this answer from the other topic: https://learn.fabric-testbed.net/forums/topic/test-server-bastion-host-login/#post-982

              #998
              POLINA LYUBAVINA
              Participant

                Hi Paul,

                My id_rsa_fabric is called fab_rsa on my local machine and I’ve copied that over to the Jupyter host. I updated the code that you have above to make that one change. And I’m able to build slices, just not able to log in to them. Here’s the stack trace that I’m getting:

                
                
                Unknown exception: q must be exactly 160, 224, or 256 bits long
                Traceback (most recent call last):
                File “/opt/conda/lib/python3.9/site-packages/paramiko/transport.py”, line 2109, in run
                handler(self.auth_handler, m)
                File “/opt/conda/lib/python3.9/site-packages/paramiko/auth_handler.py”, line 298, in _parse_service_accept
                sig = self.private_key.sign_ssh_data(blob)
                File “/opt/conda/lib/python3.9/site-packages/paramiko/dsskey.py”, line 108, in sign_ssh_data
                key = dsa.DSAPrivateNumbers(
                File “/opt/conda/lib/python3.9/site-packages/cryptography/hazmat/primitives/asymmetric/dsa.py”, line 244, in private_key
                return backend.load_dsa_private_numbers(self)
                File “/opt/conda/lib/python3.9/site-packages/cryptography/hazmat/backends/openssl/backend.py”, line 826, in load_dsa_private_numbers
                dsa._check_dsa_private_numbers(numbers)
                File “/opt/conda/lib/python3.9/site-packages/cryptography/hazmat/primitives/asymmetric/dsa.py”, line 282, in _check_dsa_private_numbers
                _check_dsa_parameters(parameters)
                File “/opt/conda/lib/python3.9/site-packages/cryptography/hazmat/primitives/asymmetric/dsa.py”, line 274, in _check_dsa_parameters
                raise ValueError(“q must be exactly 160, 224, or 256 bits long”)
                ValueError: q must be exactly 160, 224, or 256 bits long
                
                

                Here’s the printed output:
                Node Node1 IP 63.239.135.112
                q must be exactly 160, 224, or 256 bits long

                Thanks,

                Polina

                #1006
                Paul Ruth
                Keymaster

                  Are you able to login from a terminal window?

                  #1034
                  POLINA LYUBAVINA
                  Participant

                    In the terminal, I tried

                    
                    ssh polinalyub_@63.239.135.112 -vvv
                    

                    and this is part of the response

                    
                    debug1: Offering public key: /home/fabric/.ssh/id_rsa RSA SHA256:j8FrCXHeQrou+3J3NEFD9x+C+6nGiViOl9PKLmZ9cq4
                    debug3: send packet: type 50
                    debug2: we sent a publickey packet, wait for reply
                    debug3: receive packet: type 51
                    
                    #1059
                    JOSEPH BREEN
                    Participant

                      Paul,

                      I worked with Polina today.  She is not able to jump through the bastion and login to the testnode in the process that Mert sent.  She can login to the node 128.194.6.201 with her key without issue.  However, if she tries to use the bastion host, the login fails.  Something seems to be amiss with her username/key pairing on the bastion.  Mert may need to explore and/or do a screen share with her to determine more.

                       

                       

                      #1060
                      JOSEPH BREEN
                      Participant

                        Paul,

                        I worked with Austin today too.  Something is up with his keys as well.  He could no longer pass Mert’s test configuration.  He could not even log in at all to the test host or pass the bastion host.  I had him create new keys and follow up with Mert to request that Mert reset his keys.

                      Viewing 10 posts - 1 through 10 (of 10 total)
                      • You must be logged in to reply to this topic.