Trying to connect using ssh2_auth_pubkey_file()

前端 未结 3 2298
离开以前
离开以前 2021-02-20 11:16

I am trying to make a php script that runs on the terminal that would connect to a remote server by ssh and retrieve a file. this is my code so far

#!/usr/bin/ph         


        
3条回答
  •  -上瘾入骨i
    2021-02-20 11:39

    I have been using this function for around 3 years and for some reason a new server that I was configuring didn´t work. I was about to jump by the balcony when I found this :

    ssh-keygen -m PEM -t rsa -b 4096
    

    using the link @megar answered years ago.

    Hope it helps someone else, this was hard!

提交回复
热议问题