Random bus error or segmentation fault when trying to connect via SSH2 #1968
Replies: 1 comment
-
Can you post the text of the 2x errors you're getting? Also, can you do I feel like the error is probably happening when phpseclib is attempting to use the private key to create a signature. If that's the case then could you do this?: #
#-----[ OPEN ]------------------------------------------
#
phpseclib/Net/SSH2.php
#
#-----[ FIND ]------------------------------------------
#
$privatekey = $privatekey->withHash($hash);
#
#-----[ AFTER, ADD ]------------------------------------
#
echo "$privateKey\n\n";
echo "hash = $hash\n\n\n";
echo bin2hex(Strings::packSSH2('s', $this->session_id) . $packet) . "\n"; If it doesn't get that far when the error happens lmk. If it does get that far... well, don't post the content on github as it'll contain your private key. I mean, if you don't care about your private key being out in the open then by all means post it but otherwise I wouldn't. But what I'm thinking is that that would enable us to consistently reproduce the issue. In order to reliably reproduce the issue I'd need to share some additional code with you wherein you'd plug in the values you got back from that but, one step at a time. LMK if, when the error happens, if it gets that far. |
Beta Was this translation helpful? Give feedback.
-
I am experiencing random bus error or segmentation fault when trying to connect to a server using SSH2 class in a laravel command controller. Sometimes in works like a charm and sometime the login ends with a bus error or even a segmentation fault....
Log Output if connection is successful:
Log output on bus error
I am working on MacOS Sonoma using Laravel Herd development environment with PHP 8.1.
Any idea about the cause of this problem would be appreciated.
Thx in advance
Andreas
Beta Was this translation helpful? Give feedback.
All reactions