Error: connect EHOSTUNREACH 192.168.21.34:22 - Local (192.168.21.58:49182)
Error: connect EHOSTUNREACH 192.168.21.34:22 - Local (192.168.21.58:49182) at internalConnect (node:net:953:16) at defaultTriggerAsyncIdScope (node:internal/async_hooks:465:18) at node:net:1044:9 at processTicksAndRejections (node:internal/process/task_queues:78:11) { errno: -65, code: 'EHOSTUNREACH', syscall: 'connect', address: '192.168.21.34', port: 22, level: 'client-socket' }
What's wrong with that
var Client = require('ssh2').Client var connect = new Client()
"ssh2": {
"version": "1.11.0",
"integrity": "sha512-nfg0wZWGSsfUe/IBJkXVll3PEZ//YH2guww+mP88gTpuSU4FtZN7zu9JoeTGOyCNx2dTDtT9fOpWwlzyj4uOOw==",
"dev": true,
"requires": {
"asn1": "^0.2.4",
"bcrypt-pbkdf": "^1.0.2",
"cpu-features": "~0.0.4",
"nan": "^2.16.0"
}
},
EHOSTUNREACH means your OS could not find a route to that host. It is not an ssh2-specific error.
Is this about the system?
系统 Apple M4
It's an OS/networking issue, not an ssh2 issue.