-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authentication Issues with Netopeer2 - Unable to Connect via SSH with Admin User #1675
Comments
The easiest way to debug this in netopeer2-cli to use |
Unfortunately there is no output from, verb debug and netopeer2-server -d -c SSH. And my netopeer2 server is inactive. |
I have a question: do you have any Python library, so I can automate it rather than using CLI? |
I do not understand, just run it directly and it must output at least something. But you are supposed to try to connect and you should see SSH debug messages.
We do not provide any Python NETCONF client but you should be able to find some free ones, you can use any with netopeer2-server. |
this is my output
|
So, as for netopeer2-server, you need to compile it with the default
Regarding netopeer2-cli, I thought it would be obvious to use the command and then try to connect
|
Hey, thank you for your quick response. I have added the output i got. skt@ipt-d-0375:~$ sudo netopeer2-server -d -c SSH [2024/11/28 15:53:02.441732, 3] ssh_connect: current state : 6 |
In the configuration you posted before your user |
I do not know it is a silly question or not, but I have doudt that here my server is a switch and client netopeer2, how can i authenticate with a switch from client? I install the netopeer2 via ssh to my client, it okay or i need to do it onsite? for me i do not see any problem to do the installment process via remotely or onsite, but I have read one issue, you may advise to do not do this via ssh, if i am not wrong. |
Please try to be more clear, I do not understand what you are saying. What is that about a switch, you are not running netopeer2 on a Linux? And how can you install netopeer2 via SSH, you mean by SFTP? |
Hi; d-0375: d-0375:~$ netopeer2-server -d -v2 d-0375:~$ sudo systemctl status netopeer2-server Dez 03 10:21:56 ipt-d-0375 systemd[1]: netopeer2-server.service: Scheduled restart j> |
This means the server is already running. There is no other relevant information and I suggest you use the systemd service only after you make sure the server can run successfully. |
Okay, but i do not get any output when I run netopeer2-server this command. and when i checked the status of the server, it shows failed of activity. here i have added the logs d-0375: Dez 03 10:21:56 ipt-d-0375 systemd[1]: netopeer2-server.service: Scheduled restart job, restart counter is at 5. |
If you run the server as
you will see some messages, just do not have another instance of netopeer2-server running. |
I hav received these message and i am struggling with netopper2-cli and now netopeer2-server. I am not clear with this authentication issues actually, though i have tried with your previous instruction "You configure an SSH key in the CLI using the command auth keys add <public_key_path> <private_key_path> (look at auth --help to see command signature)." -d-0375:~$ python3 netconf_client.py i have tried with this and i got error message when i tried to conncet netopeer2-cli with server(switch). now i am getting the error message now i am tring to automate the system via ncclient library as you told, this my output. do i need to change or edit any file? for your information, in my ietf-netconf-server.xml file my username is according my pc name, wheere else my server name is different, is it a problem? or ? I have doubt and not clear how to proceed *I mainly need to automate the pipeline via netconf and I wanted to see this manually as well thats why first time i wanted to try with netopeer2-cli |
Run the server as |
Hey I have added my ietf-netconf-server file again
after trying to connect with netopeer2-cli, I get the error message
here is my server output
can you help me out from here? Thank you |
That is not the full output of netopeer2-server, it did not even print the INF message about a new connection. Fix that first although I am not sure how you managed to connect to another server since it should not be possible to have 2 instances running on a single machine. |
Sorry, for more clarification, what do you mean by two instances 'how you managed to connect to another server since it should not be possible to have 2 instances running on a single machine.' I have those output when i run sudo netopeer2-server -d -c SSH this command. How can I fix the issue? but I get these output when I run sudo netopeer2-server -d -v2. both are same or different? |
When you connect with a client, it must print more messages. If the server did not, you have not connected to it. |
Hey, I do not see any additional messages when I am connecting with the client in server end. What can i do? Here i have added how did I installed the netopeer2 installing Netopeer2 and Dependencies** Install Required Dependencies sudo apt update
sudo apt install -y build-essential cmake git libpcre3-dev libev-dev libssl-dev zlib1g-dev \
libprotobuf-c-dev protobuf-c-compiler swig python3-dev Clone the Repositories # Clone Netopeer2 repository
git clone https://github.com/CESNET/Netopeer2.git
# Clone Sysrepo repository
git clone https://github.com/sysrepo/sysrepo.git
# Clone Libyang repository
git clone https://github.com/CESNET/libyang.git
# Clone Libnetconf2 repository
git clone https://github.com/CESNET/libnetconf2.git
# sudo apt-get install doxygen
1264 sudo apt-get install g++
git clone https://git.libssh.org/projects/libssh.git
Build and Install the Libraries
(a) Install `libyang`
```bash
cd libyang
mkdir build && cd build
cmake ..
make
sudo make install
sudo ldconfig (b) Install cd ../../libnetconf2
mkdir build && cd build
cmake ..
make
sudo make install
sudo ldconfig (c) Install cd ../../sysrepo
mkdir build && cd build
cmake -DREPOSITORY_LOC=/etc/sysrepo ..
make
sudo make install
sudo ldconfig cd libssh (d) Install cd ../../Netopeer2
mkdir build && cd build
cmake ..
make
sudo make install
sudo ldconfig |
Installation seems fine so I really cannot help you, something is wrong on your end. |
okay |
Hey, I have one question, what do you mean by two instances in same device? do you mean, I can run in one device netopeer2-cli and another device netopeer2-server? or its okay to run in one? |
Yes, it is fine to run both the client and the server on one machine, that is what I expected. Never mind what I said before, I referred to running 2 instances of netopeer2-server on a single machine. |
Hi, a> get
|
If you set some sysrepo oper data callbacks for the interfaces that take a long time to execute, it can cause these timeouts. What platform are you on? You seem to have lots of issues. |
Yes you are right, I am using Ubuntu 24.04 LTS and server (Kontron KSwitch D10 MMT Series switch) |
So you are trying to run netopeer2-server on that switch? What OS does it have? |
I am not running the netopeer2-server directly on my switch. Instead, I am using it on my PC as the server, along with netopeer2-cli as the client, to establish a NETCONF connection with the switch. The goal is to use this setup to interact with the switch over the NETCONF protocol. Once the connection is established and tested via CLI, I plan to automate the system using the Python library ncclient for further configuration and management tasks. I am not sure do I need netopeer2-server when I want to use the netopeer2-cli, or I need the server to see the log. |
Hi; How can I solve the issue? |
Well, that would explain why you did not see any logs for netopeer2-server and I was right in saying that you are not even connecting to it, if the switch has a NETCONF capability on its own. So, NETCONF operates on the client - server communication model meaning one peer acts as the client, which connects to another peer that acts as the server. In your case, the local machine with netopeer2-cli is the client and the switch is the server so no, you do not need to be running netopeer2-server at all. Having cleared that up, I would just say that our main software is netopeer2-server and the CLI is meant mostly for testing and non-deployment use. As for your issue, to learn what options does a command have, run |
Hi thank you, I have tried still no response,
|
You need to look at some output of the device or contact their support, I cannot help you anymore. |
I am experiencing authentication issues while trying to connect to the Netopeer2 server. The connection fails even though I have configured the NETCONF server, SSH keys, and various settings as described in the documentation. I am unable to authenticate as the
admin
user or any other configured user.Actual Behavior:
System Information:
The text was updated successfully, but these errors were encountered: