全部博文(108)
分类: 系统运维
2014-05-13 21:31:02
Hosts, in this context, refer to what are also called “host strings”: Python strings specifying a username, hostname and port combination, in the form of username@hostname:port. User and/or port (and the associated @ or :) may be omitted, and will be filled by the executing user’s local username, and/or port 22, respectively. Thus, admin@foo.com:222, deploy@website andnameserver1 could all be valid host strings.
IPv6 address notation is also supported, for example ::1, [::1]:1222, user@2001:db8::1 oruser@[2001:db8::1]:1222. Square brackets are necessary only to separate the address from the port number. If no port number is used, the brackets are optional. Also if host string is specified via command-line argument, it may be necessary to escape brackets in some shells.