/*
* This is a v2 server. Begin v2 protocol.
*/
- char *verstring = "SSH-2.0-PuTTY";
+ char verstring[80];
+ sprintf(verstring, "SSH-2.0-%s", sshver);
SHA_Init(&exhashbase);
/*
* Hash our version string and their version string.
/*
* This is a v1 server. Begin v1 protocol.
*/
- sprintf(vstring, "SSH-%s-PuTTY\n",
- (ssh_versioncmp(version, "1.5") <= 0 ? version : "1.5"));
+ sprintf(vstring, "SSH-%s-%s\n",
+ (ssh_versioncmp(version, "1.5") <= 0 ? version : "1.5"),
+ sshver);
sprintf(vlog, "We claim version: %s", vstring);
vlog[strcspn(vlog, "\r\n")] = '\0';
logevent(vlog);
*/
logevent("No username provided. Abandoning session.");
ssh_state = SSH_STATE_CLOSED;
- crReturn(1);
+ crReturnV;
}
} else {
c_write_str("login as: ");
* Potentially enable agent forwarding.
*/
if (cfg.agentfwd && agent_exists()) {
- char proto[20], data[64];
logevent("Requesting OpenSSH-style agent forwarding");
ssh2_pkt_init(SSH2_MSG_CHANNEL_REQUEST);
ssh2_pkt_adduint32(mainchan->remoteid);