Skip to content

Commit 08a6c46

Browse files
committed
Document fingerprinting
1 parent ca10dce commit 08a6c46

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ composer require divineomega/php-ssh-connection
1515

1616
## Usage
1717

18+
See the following basic usage instructions.
19+
1820
```php
1921
$connection = (new SSHConnection())
2022
->to('test.rebex.net')
@@ -32,3 +34,14 @@ $command->getError(); // ''
3234
$connection->upload($localPath, $remotePath);
3335
$connection->download($remotePath, $localPath);
3436
```
37+
38+
For security, you can fingerprint the remote server and verify the fingerprint remain the same
39+
upon each subsequent connection.
40+
41+
```php
42+
$fingerprint = $connection->fingerprint();
43+
44+
if ($newConnection->fingerprint() != $fingerprint) {
45+
throw new Exception('Fingerprint does not match!');
46+
}
47+
```

0 commit comments

Comments
 (0)