I just realized after I wrote this, that I probably need to change winscp transfer mode to binary rather than default. After transfer in binary mode, the enrollment on the LXC using the suggested method succeded.
sudo ziti-edge-tunnel add --jwt "$(< ./in-file.jwt)" --identity
{
"Success":true,
"Code":0
}
But when I check the tunnel service, I'm still getting this error.
sudo systemctl status ziti-edge-tunnel.service
WARN ziti-sdk:model_support.c:202 model_parse() json parse error: expected comment
ERROR ziti-sdk:channel.c:943 on_tls_connect() ch[0] failed to connect to ER[quickstart-router] [-3008/unknown node or service]
ERROR ziti-sdk:channel.c:943 on_tls_connect() ch[0] failed to connect to ER[quickstart-router] [-3008/unknown node or service]
ERROR ziti-sdk:channel.c:943 on_tls_connect() ch[0] failed to connect to ER[quickstart-router] [-3008/unknown node or service]
When I check the tunnel_status, in addition to the current identity (test-identity-2), I find an old identity that I tried to enroll on this machine previously (test-identity-1). But instead of using the ziti-edge-tunnel to delete that identity, I simply deleted that json file in /opt/openziti/etc/identities/ folder. So now I don't know how to delete that identity.
I wonder if the fail to connect error above may be related to this old identity? How do I start from a clean slate for the ziti-edge-tunnel on this LXC?
sudo ziti-edge-tunnel tunnel_status
{
"Success":true,
"Data":{
"Active":false,
"Duration":171179,
"StartTime":"2024-10-16T05:34:18.245000Z",
"Identities":[
{
"Name":"test-identity-1",
"Identifier":"\/opt\/openziti\/etc\/identities\/test-identity-1.json",
"FingerPrint":"test-identity-1",
"Active":true,
"Loaded":false,
"IdFileStatus":false,
"NeedsExtAuth":false,
"MfaEnabled":false,
"MfaNeeded":false,
"Metrics":{
"Up":0,
"Down":0
},
"MfaMinTimeout":0,
"MfaMaxTimeout":0,
"MfaMinTimeoutRem":0,
"MfaMaxTimeoutRem":0,
"MinTimeoutRemInSvcEvent":0,
"MaxTimeoutRemInSvcEvent":0,
"Deleted":false,
"Notified":false
},
{
"Name":"test-identity-2",
"Identifier":"\/opt\/openziti\/etc\/identities\/test-identity-2.json",
"FingerPrint":"test-identity-2",
"Active":true,
"Loaded":true,
"Config":{
"ztAPI":"https:\/\/vps-public-ip:1280"
},
"ControllerVersion":"v1.1.15",
"IdFileStatus":false,
"NeedsExtAuth":false,
"MfaEnabled":false,
"MfaNeeded":false,
"Metrics":{
"Up":0,
"Down":0
},
"MfaMinTimeout":0,
"MfaMaxTimeout":0,
"MfaMinTimeoutRem":0,
"MfaMaxTimeoutRem":0,
"MinTimeoutRemInSvcEvent":0,
"MaxTimeoutRemInSvcEvent":0,
"Deleted":false,
"Notified":false
}
],
"IpInfo":{
"Ip":"100.64.0.1",
"Subnet":"255.192.0.0",
"MTU":65535,
"DNS":"100.64.0.2"
},
"LogLevel":"warn",
"ServiceVersion":{
"Version":"v1.2.2",
"BuildDate":"Sun-10\/13\/2024-17:09:13-UTC"
},
"TunIpv4":"100.64.0.1",
"TunIpv4Mask":10,
"AddDns":false,
"ApiPageSize":25
},
"Code":0
}