大网数据广告活动
服务器运维问答

AWS best method to ssh between servers in private subnet

· 52CE 我爱测

Is it just normal Linux user creation at this point? I have my NAT and Bastion set up to login with SSH forwarding: ssh -A ec2-user@bastionhost ssh ec2-user@privateSubnetServer What's the best method for handling ssh and users at…

问题原文

原帖链接 · rumplesmyboy · CC BY-SA 4.0

Is it just normal Linux user creation at this point?

I have my NAT and Bastion set up to login with SSH forwarding:

ssh -A ec2-user@bastionhost
ssh ec2-user@privateSubnetServer

What's the best method for handling ssh and users at this point between hosts in the private subnet?

I can't set up or connect to a directory service at this point.

已采纳解答

原帖链接 · rumplesmyboy · CC BY-SA 4.0

If they’re both in the same subnet then they’ll nearly always have connectivity. That gives you two approaches:

You could edit /etc/ssh/sshd_config on the server to make sure that password authentication is permitted and then use passwd to give a password to the user account on the server you’ll be logging into. Those two steps do, however, introduce a level of vulnerability.

The better solution would be to (securely) copy a private .pem key to the client that you can use to permit passwordless SSH access to the server. You can then SSH in using: ssh -i keyname.pem username@If they’re both in the same subnet then they’ll nearly always have connectivity.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-09-18)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。