I searched “man ssh” and all the documentation I could find on the PHP ssh2_connect function and cannot find any mention of a “+ct” option. What exactly is “+ct”?
Incidentally the problem appears not the connection, it’s connecting fine and there are no errors, it’s just that any commands I subsequently run with:
when you log in add +ct to username.
For example if username is “admin” then log in with name “admin+ct” this will disable console colors and terminal detection.
eugenevdm -
What mrz means is for you add " +ct " to your login name in your linux script.
If the commands you are trying to run are not working via the output of your script - I suggest that you try the commands in terminal mode on your MT router and see what is not working. There are a few command differences in ROS v3.x over ROS v2.9.xx …
It appears the problem was syntax related. The reason why I couldn’t see the syntax error is because Mikrotik is not reporting anything in it’s logs when you log on programmatically using SSH.
On version 2.9 you can see the user logging in by observing the log file.
On version 3.x you cannot see the user logging in even though the user is logged in. When you cause an error nothing shows (in the log).
The syntax error is:
In version 2.9 you can do this:
/interface wireless access-list set [find mac-address="$client_mac_address"] comment = "$comment"";
In version 3.x you have to do remove the “=”:
/interface wireless access-list set [find mac-address="$client_mac_address"] comment "$comment"";
Luckily the version 3.x syntax is backwards compatible with the version 2.9 syntax.