Showing results for 
Search instead for 
Did you mean: 

Specific SSH port does not work

Occasional Visitor

Specific SSH port does not work

Hello community!

I'm trying to run tcl script (to backup device) on a non-standard SSH port. I run IMC 7 under Windows 2012.

The specific port is well defined for the device, the problem is that the session initiated with plink.exe does not take the port variable.

In the ssh_sftp_client.cfg, I can find:


ssh-cmd = plink.exe [-i $key-file] $user-name@$device-ip
sftp-cmd = psftp.exe [-i $key-file] $user-name@$device-ip


So, even if I define the specific SSH port for the device, it should have a "-P [$port]" option to take care of it.

I've tried unsuccessfully many variables name ($port, $device-port, ...). I've checked in the binary file to find a variable name, but no success.

Is anyone know how to acheive it ?


Honored Contributor

Re: Specific SSH port does not work

I had a bit of a hunt around, and I could only find a couple of possibilities for variable name - ssh_port, or sshPort. 


The interesting thing is that if you run 'strings' on imccfgbakdm, you can see the SQL commands that include retrieving the ssh_port value. So theoretically it should be able to handle it.


I think you should log a support case with HP about this, as it seems like something it should be able to do.


It looks like it definitely won't work for any of the SCP adapters - e.g. the CiscoIOSGeneric SCP adapter contains lines like this:


spawn pscp -scp $username@$deviceip:running-config $FileName


So that won't ever take a port value, and it probably also needs updating.