0

Is there way to create short domain name aliases in ubuntu?

I am using ec2 clusters a lot and its tough to keep track of their domain names to login each time.

If there is a way in which i can give custom domain names aliases, it would be great. For example,

ec2-XX-XX-XX-XX.compute-1.amazonaws.com --> myserver1

4

2 回答 2

0

您是否有理由无法在 shell 中为命令创建别名?我使用 tcsh,所以在我的.cshrc

alias   dev     "ssh dev"

所以你可以:

alias myserver1 "ssh ec2-XX-XX-XX-XX.compute-1.amazonaws.com"
于 2012-03-07T15:25:20.800 回答
0

您可以在 AWS 上创建一个弹性 IP 并将其附加到您的 AWS 实例(如果需要,我可以为您提供更好的操作说明)。

将弹性 IP 附加到实例后:

  • 您显然可以通过 SSH 连接到这个新 IP
  • 您可以在 hosts.conf 文件中创建一个条目以将此 IP 映射到任何昵称/主机名

这只是对可以做的事情的总结。如果需要更具体的细节,请给我留言。

于 2012-07-17T08:31:21.263 回答