Command input via ssh running on an unconventional port

Error message

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'comment_node_forum_form' not found or invalid function name in drupal_retrieve_form() (line 844 of /var/www/www.gremwell.com/includes/form.inc).

Submitted by c4rt on 22 July, 2012 - 22:51

Hi,

how execute a command input on a server whose ssh server run NOT on TCP/22 port?

I've ever try some kind of ssh tunnel tricks like :

ssh -N -L 22:localhost:REMOTE-PORT user-remote@remote-host

but it failed in my Linux host (tcp/22 is a privileged port ....)

Could it be possible to choose the ssh port in Command Input Box or could we have something like User@Host:Port in the field User@Host under the Command field?

Perhaps the easiest is to set a custom port in ~/.ssh/config. For example, if your target hostname is xyz and port 12345, put:

Host xyz
Port 12345

into .ssh/config. If you do that, whenever you do 'ssh xyz' the openssh client will use the specified port to log into the server. More information for the syntax of that file can be found in 'man ssh_config'.

Another solution is to chage ~/.magictree/bin/config file, it contains 'sshcmd' and 'sshicmd' variables. You can add -p to both commands, it should do the trick.