# Run your App in instance AWS or AZURE or any  other instance

## Ways:

### 1\. Github

[Generating a new SSH key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key)

```shell
 ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
```

[Adding your SSH key to the ssh-agent](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent)

```shell
eval "$(ssh-agent -s)"
```

```shell
ssh-add ~/.ssh/id_rsa
```

Expected O/P:

![output image](https://cdn.hashnode.com/res/hashnode/image/upload/v1708204969860/e6658608-cb3a-4f63-b62b-4a88fe5f384b.png align="center")

[Adding a new SSH key to your account](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account#adding-a-new-ssh-key-to-your-account)

```plaintext
cat ~/.ssh/id_rsa.pub
```

copy the value and paste it in `github.com > settings > Access > SSH keys > Add new SSH`

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1708205318386/e0d7ad53-ba0f-42ee-920a-36646bcc083c.png align="center")

* Click **Add SSH key**.
    
* If prompted, confirm access to your account on GitHub.
    

[Testing your SSH connection](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection)

```shell
ssh -T git@github.com
```

Expected O/P:

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1708262684009/99384a39-98c0-4e31-8d59-703e63be6d4c.jpeg align="center")

* Finally, `git clone your_repo`
    
<hr/>

### 2\. SCP Command:

It is the single line command to completely move you dir to ur instance using your .cert / .pem key

```shell
sudo scp -i /key.cer -r /project_folder user@[ipaddress]:/destination_dir/
```

ex: `sudo scp -i /Users/nishaanth/Downloads/key.cer -r police/ azureuser@1.2.3.4:/home/azureuser/`
