transfer virtual server ssh port

5 posts / 0 new
Last post
#1 Wed, 11/05/2014 - 21:44
specktator

transfer virtual server ssh port

Hi,

I tried to transfer a vhost to another webmin-clustered server but unfortunately i saw that i can't set a non-standard port for the ssh connection!

How can i do it?

thnx in advance,

speck

Wed, 11/05/2014 - 21:53
andreychek

Howdy,

Oddly, you're the third person to bring that up in the last 24 hours... we hadn't heard anything at all about that previously, it's great that folks are using that feature more now :-)

There's some information on that here:

https://www.virtualmin.com/node/35102

Wed, 11/05/2014 - 21:59 (Reply to #2)
specktator

Hey, That was fast! :)

Huh you're right! Do you know what's the ETA of the next version or where can I find a patch or an updated version of transfer-domain.pl ?

I really need the feature ... :S

Thu, 11/06/2014 - 11:37
andreychek

The next release should be out in a few days, but in the meantime, the following are the changes to support specifying the SSH port:

modules/virtual-server/transfer-domain.pl
@@ -52,7 +52,8 @@ package virtual_server;
}
elsif ($a eq "--host") {
$desthost = shift(@ARGV);
- &to_ipaddress($desthost) || &to_ip6address($desthost) ||
+ ($desthostname) = split(/:/, $desthost);
+ &to_ipaddress($desthostname) || &to_ip6address($desthostname) ||
&usage("Destination system cannot be resolved");
}
elsif ($a eq "--pass") {
modules/virtual-server/transfer.cgi
@@ -16,7 +16,8 @@ if ($in{'host_mode'}) {
}
else {
$in{'host'} =~ /^\S+$/ || &error($text{'transfer_ehost'});
- &to_ipaddress($in{'host'}) || &to_ip6address($in{'host'}) ||
+ ($hostname) = split(/:/, $in{'host'});
+ &to_ipaddress($hostname) || &to_ip6address($hostname) ||
&error($text{'transfer_ehost2'});
$host = $in{'host'};
$pass = $in{'hostpass'};
Tue, 08/04/2015 - 03:11
iateadonut

Why not check the /root/.ssh/config file?

I might have this in my /root/.ssh/config:

Host 2nd.server Port 55455 IdentityFile ~/.ssh/id_rsa3

I think it would make sense for virtualmin to check the ssh settings. I assume it must when it tries to connect with a key?

Topic locked