Moved whole Arduino sketchbook to GIT (nothing interesting :-)
[mirrors/Programs.git] / php / sshb.php
CommitLineData
8de51304
H
1#!/usr/bin/php
2<?php
3
4$user = 'harvie';
5$host = 'harvie.ath.cx';
6$port = 22;
7
8$stdin = fopen('php://stdin', 'r');
9while(!feof($stdin)) {
10 $pass = trim(fgets($stdin));
11 $ssh = ssh2_connect($host, $port);
12 if (ssh2_auth_password($connection, $user, $pass)) {
13 echo("Authentication Successful: $pass\n");
14 } else {
15 die("Authentication Failed...\n");
16 }
17}
This page took 0.150526 seconds and 4 git commands to generate.