Fedora server said
But when I try it from host
ssh vsock%1
ssh: Could not resolve hostname vsock%1: Name or service not known
Question: how to see the vsocks?
Solution found.
I use this method to identify the CID, probably there are better ways, but this works, vm1 is machine name
virsh dumpxml vm1 |grep cid|grep addr|cut -d = -f 3|cut -d "'" -f 2
return 3
so...(3 is cid, 22 is ssh port)
ssh -o ProxyCommand="socat - VSOCK-CONNECT:3:22" myname
myname@myname's password:
:)
Works
myname@localhost:~$ ss -f vsock
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
v_str ESTAB 0 0 3:22 2:123456789
Also this command works fine
ssh myname@vsock/3