It’s possible today to open an upstream SSH connection over an existing SSH tunnel, though it’s not quite as direct as you asked for here. The simplest way is to propose set up port forwarding. For instance:
with (yield from asyncssh.connect(‘host1')) as conn:
listener = yield from conn.forward_local_port('localhost', 8022, ‘host2', 22)
with (yield from asyncssh.connect('localhost', 8022)) as conn2:
...Open sessions on conn2...
The only minor bit of trickiness is that you’d need to add an entry in your known_hosts file for [localhost]:8022 which lists whatever server host keys you’re expecting to get back from host2.
I like your idea to provide a direct call that simplifies this, though. It would make it possible to use the known_hosts entry for host2 that’s already there, even though the connection is being tunneled. It would also mean that a one-time direct connection could be used, rather than having to set up port forwarding. I’ll look into adding this - thanks for the suggestion!