[Coco] MysticBBS
Mathieu Bouchard
matju at artengine.ca
Tue Jun 27 12:10:01 EDT 2017
Le 2017-06-26 à 22:19:00, RETRO Innovations a écrit :
> On 6/26/2017 7:52 PM, Gene Heskett wrote:
>> On Monday 26 June 2017 20:09:31 Gregory Law wrote:
>>
>>> The port number should be specified in the -p parameter like this.
>>>
>>> ssh Mystic.dynu.net -p 2310
>>>
>> That appears to work, but whats the diff between ssh Mystic.dynu.net -p
>> 2310,
>>
>> and ssh Mystic.dynu.net:2310? Thats how people get into this machine
>> using http protocol. Difference in routers and port forwarding I guess.
> the http protocol stipulates a URI nomenclature, but ssh was designed as
> a replacement for telnet and rlogin, which do not know about URIs, as
> they were developed in the 1970s and 1980s, prior to Berners-Lee and HTTP.
>
> Some newer applications allow :port as a shortcut to a command line arg,
> but ssh does not.
BTW, here's a ruby script that edits :port to turn it into -p port except when
it appears as the parameter of an option.
#!/usr/bin/env ruby
i=0
while i<ARGV.length
case ARGV[i]
when /^-[bcDEeFIiLlmOopQRSWw]$/; i+=1
when /^-/
else
a=ARGV[i].split(/:/)
ARGV[i,1]=[a[0],"-p",a[1]] if a[1]
end
i+=1
end
system "ssh", *ARGV
______________________________________________________________________
| Mathieu BOUCHARD --- tél: 514.623.3801, 514.383.3801 --- Montréal, QC
More information about the Coco
mailing list