我们正在尝试使用库 netconf 并在 js https://github.com/darylturner/node-netconf#readme中发送编辑配置/get-config 的 netconf 请求。下面是代码:
const router = new netconf.Client({
host: '172.31.112.123',
username: 'root',
password: 'baaroot',
port: 22
})
router.open( (err) => {
if (err) {
throw err;
}
router.rpc( 'get-config', (err, reply) => {
console.log(JSON.stringify(reply))
router.close()
if (err) {
throw err;
}
console.log(JSON.stringify(reply))
})
})```
I see the below error
[enter image description here][1]
[1]: https://i.stack.imgur.com/VT7jZ.jpg
Do we have any javascript libraries to perform netconf operations through UI ?