# Can’t do SSH RockyLinux9 in AWS by using TTL

**URL:** <https://forums.rockylinux.org/t/can-t-do-ssh-rockylinux9-in-aws-by-using-ttl/8219>\
**Category:** Rocky Linux Help & Support\
**Created:** [December 12, 2022, 5:50am UTC](https://forums.rockylinux.org/t/can-t-do-ssh-rockylinux9-in-aws-by-using-ttl/8219 "2022-12-12T05:50:40Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hirotodude](https://avatars.discourse-cdn.com/v4/letter/h/6a8cbe/32.png) [@Hirotodude](https://forums.rockylinux.org/u/Hirotodude)\
**Post date:** [December 12, 2022, 5:50am UTC](https://forums.rockylinux.org/t/can-t-do-ssh-rockylinux9-in-aws-by-using-ttl/8219/1 "2022-12-12T05:50:40Z")

</div>

I put “rocky” for the default user but I couldn’t login through AWS.  
I subscribed an official Rocky Linux 9 (Official) - x86\_64 instance through AWS Marketplace.  
Is this default user appropriate? or Do I need to do something??

---

<div class="post-metadata">

**Author:** ![iwalker](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/iwalker/32/2599_2.png) [@iwalker](https://forums.rockylinux.org/u/iwalker)\
**Post date:** [December 12, 2022, 6:51am UTC](https://forums.rockylinux.org/t/can-t-do-ssh-rockylinux9-in-aws-by-using-ttl/8219/2 "2022-12-12T06:51:52Z")

</div>

Have you an SSH key uploaded to your AWS account. Indeed the user is rocky. What was the error message? Alternatively, please copy/paste the full output from:

```auto
ssh -v rocky@your_aws_instance

```

and post it here. Please do not screenshot it, we need to see the full output.

If nothing, then ensure that ingress for port 22 is open.

---

<div class="post-metadata">

**Author:** ![lee](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/lee/32/807_2.png) [@lee](https://forums.rockylinux.org/u/lee)\
**Post date:** [December 12, 2022, 7:52am UTC](https://forums.rockylinux.org/t/can-t-do-ssh-rockylinux9-in-aws-by-using-ttl/8219/3 "2022-12-12T07:52:43Z")

</div>

the command is should be something like  
ssh -i your.cert.pem rocky@aws-ip

---

<div class="post-metadata">

**Author:** ![Hirotodude](https://avatars.discourse-cdn.com/v4/letter/h/6a8cbe/32.png) [@Hirotodude](https://forums.rockylinux.org/u/Hirotodude)\
**Post date:** [December 13, 2022, 12:41am UTC](https://forums.rockylinux.org/t/can-t-do-ssh-rockylinux9-in-aws-by-using-ttl/8219/4 "2022-12-13T00:41:00Z")

</div>

> [@iwalker](#):
>
> SH key  
> [/quote] [quote=“iwalker, post:2, topic:8219, full:true”]  
> Have you an SSH key uploaded to your AWS account. Indeed the user is rocky. What was the error message? Alternatively, please copy/paste the full output from:
> 
> ```auto
> ssh -v rocky@your_aws_instance
> 
> ```
> 
> and post it here. Please do not screenshot it, we need to see the full output.
> 
> If nothing, then ensure that ingress for port 22 is open.

Let me get straight to the point. I could do ssh login not from teraterm macro but through PowerShell.

```auto
ssh -i "rocky.pem" rocky@XXX.XXX.XXX

```

To be honest, the network is fine and SSH 22 port is opening.  
I tried to made a web/db server instance of AWS for Rocky Linux 8.7 Version. And It was easily to do SSH login from teraterm macro with rocky user.

Rocky Linux 9 is also using the same network and the same security group and the same teraterm macro as the server instance of AWS for Rocky Linux 8.7 Version.  
But it says that

> ssh2 auto-login error user authentication failed

So I still don’t know this issue come from AWS or teraterm…

```auto
;IP Address
hostname = 'XXX.XXX.XXX'

;Login User
username = 'rocky'

;Keyfile name
keyfile = 'rocky.pem'

;key passphr
;passphr = ''

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
getdir keypath
strconcat keypath '\Keys\'
strconcat keypath keyfile
msg = hostname
strconcat msg ':22 /ssh'
strconcat msg ' /auth=publickey'
strconcat msg ' /user='
strconcat msg username
strconcat msg ' /keyfile='
strconcat msg keypath
;strconcat msg ' /passwd='
;strconcat msg passphr
connect msg
wait '$'

```

The file path.  
~/keys/rocky.pem

---

<div class="post-metadata">

**Author:** ![label](https://avatars.discourse-cdn.com/v4/letter/l/c5a1d2/32.png) [@label](https://forums.rockylinux.org/u/label)\
**Post date:** [December 13, 2022, 1:48am UTC](https://forums.rockylinux.org/t/can-t-do-ssh-rockylinux9-in-aws-by-using-ttl/8219/5 "2022-12-13T01:48:11Z")

</div>

What is the strength of your SSH key? Is it a 2048 RSA key?

---

<div class="post-metadata">

**Author:** ![Hirotodude](https://avatars.discourse-cdn.com/v4/letter/h/6a8cbe/32.png) [@Hirotodude](https://forums.rockylinux.org/u/Hirotodude)\
**Post date:** [December 13, 2022, 2:23am UTC](https://forums.rockylinux.org/t/can-t-do-ssh-rockylinux9-in-aws-by-using-ttl/8219/6 "2022-12-13T02:23:34Z")

</div>

> [@label](#):
>
> 2048 RSA key

Yes, You are right.  
I am using this 2048-bit SSH-2 RSA key by generating from AWS EC2.

---

<div class="post-metadata">

**Author:** ![label](https://avatars.discourse-cdn.com/v4/letter/l/c5a1d2/32.png) [@label](https://forums.rockylinux.org/u/label)\
**Post date:** [December 13, 2022, 2:58am UTC](https://forums.rockylinux.org/t/can-t-do-ssh-rockylinux9-in-aws-by-using-ttl/8219/7 "2022-12-13T02:58:28Z")

</div>

If possible, try to issue your own key by using one of these:

- 3072 RSA: `ssh-keygen -t rsa -b 3072`
- ed25519: `ssh-keygen -t ed25519`
- ecdsa: `ssh-keygen -t ecdsa`

---

<div class="post-metadata">

**Author:** ![Hirotodude](https://avatars.discourse-cdn.com/v4/letter/h/6a8cbe/32.png) [@Hirotodude](https://forums.rockylinux.org/u/Hirotodude)\
**Post date:** [December 13, 2022, 6:22am UTC](https://forums.rockylinux.org/t/can-t-do-ssh-rockylinux9-in-aws-by-using-ttl/8219/9 "2022-12-13T06:22:52Z")

</div>

Hi @ [nazunalika](https://forums.rockylinux.org/u/nazunalika)

I could ssh login with your advice.  
Thanks a lot.

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [December 13, 2022, 8:32am UTC](https://forums.rockylinux.org/t/can-t-do-ssh-rockylinux9-in-aws-by-using-ttl/8219/10 "2022-12-13T08:32:00Z")

</div>

Rocky 9.1 did add to “DEFAULT” crypto policy:

```auto
RSAMinSize 2048

```

Hence 2048 ought to still have been enough (unless AWS image overrides that option)?

---

<div class="post-metadata">

**Author:** ![brian](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/brian/32/5777_2.png) [@brian](https://forums.rockylinux.org/u/brian)\
**Post date:** [August 25, 2023, 3:31am UTC](https://forums.rockylinux.org/t/can-t-do-ssh-rockylinux9-in-aws-by-using-ttl/8219/11 "2023-08-25T03:31:12Z")

</div>


