Caching this the first time you connect to a server and checking the result on subsequent connections
is recommended. Returns false if the server signature is not signed correctly with the public host key.
public getServerPublicHostKey ( ) : mixed | ||
return | mixed |
public function testGetServerPublicHostKey() { $ssh = new Net_SSH2($this->getEnv('SSH_HOSTNAME')); $this->assertInternalType('string', $ssh->getServerPublicHostKey()); }