jamgam Posted August 7, 2014 Share Posted August 7, 2014 I've got a little php script here at work that used to log into a SSH server and grab some log files and show them in a web browser. Simple stuff. Recently we've changed the login on the servers to use our VPN tokens instead of a password that I pick for my account. We can use authorized keys which works fine for me in putty and I'm trying to set that up because I keep getting prompted for user and password the "old" way. I'm using ssh2_auth_pubkey_file and been reading the manual about it but I can't seem to get it to work I make my connection as follows $connection = ssh2_connect($serverHost, 22, array('hostkey'=>'ssh-rsa')); Then setup the auth_pubkey. There is no passphrase or anything I use with putty so i left that part out $result = ssh2_auth_pubkey_file($connection, 'username','/path/to/id_rsa.pub','/path/to/id_rsa'); the information in my id_rsa.pub file matches what's in authorized_keys on the server in my username/.ssh dir I'm not 100% what else to check for? Anyone have any tips Thanks Link to comment https://forums.phpfreaks.com/topic/290325-ssh2-auth-pubkey-assistance/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.