~sircmpwn/hare-ssh

ref: 0b95f7dc320b11f912dcc23bf249563233c2f794 hare-ssh/cmd/ssh/main.ha -rw-r--r-- 303 bytes
0b95f7dcDrew DeVault net::ssh::client: don't close connection on finish 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use fmt;
use net::dial;
use net::ssh;
use os;

export fn main() void = {
	const conn = dial::dial("tcp", os::args[1], "ssh")!;
	defer io::close(conn);
	const client = ssh::newclient(conn)!;
	defer ssh::client_finish(&client);

	const version = ssh::client_verexch(&client)!;
	fmt::println(version)!;
};