0

I need your support for the next problematic , they let me develop a PHP page that connects by SSH to log 'm taking the library phpseclib and works well , the problem is now I need to connect to a computer from the first since no you can access it directly , do you know that command perform this action ? Please I need it soon.

$ssh = new Net_SSH2(x.x.x.x',22);
if (!$ssh->login('root', 'evergreen')) 
{
  exit('Login Failed');
}

 else
 {


 $ssh1= $ssh->exec('ssh oracle01:oracle@10.1.0.84');
 echo $ssh1;
}
neubert
  • 15,947
  • 24
  • 120
  • 212
Diana Pérez
  • 101
  • 8
  • Enable error reporting – Charlotte Dunois Jan 28 '16 at 04:27
  • http://stackoverflow.com/q/845021/3885509 – Charlotte Dunois Jan 28 '16 at 04:29
  • Pseudo-terminal will not be allocated because stdin is not a terminal. Permission denied, please try again. Permission denied, please try again. Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). Tha second connection don't work. – Diana Pérez Jan 28 '16 at 18:23
  • there are many form to this comant ssh oracle:oracle01@10.1.0.84? or put the gateway in the login? – Diana Pérez Jan 28 '16 at 18:31
  • Try this but the problem continuos : $ssh->exec('ssh oracle@x.x.x.x'); $ssh->exec('pass'); – Diana Pérez Jan 28 '16 at 19:37
  • I'd use public key auth. Put a private key in the `~/.ssh/id_rsa` file and then put the public key in 10.1.0.84's authorized_keys file. Also, this question would probably be better posted on superuser.com. You're question is, ultimately, about the SSH CLI command - not about programming. – neubert Sep 25 '16 at 20:50

0 Answers0