Skip to content
This repository has been archived by the owner on Jun 30, 2020. It is now read-only.

How do I set identity file on config? #22

Closed
miaekim opened this issue Jun 21, 2018 · 4 comments
Closed

How do I set identity file on config? #22

miaekim opened this issue Jun 21, 2018 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@miaekim
Copy link

miaekim commented Jun 21, 2018

Hello I am using amazon aws ec2 as my remote machine

I use private key file .pem to connect my machine.

sftp -o StrictHostKeyChecking=no -i .ssh/myidrsa ubuntu@ec2-banana.amazon.com

I used following config

{
    "folders": [{
        "uri": "sftp://ubuntu@ec2-banana.amazon.com/",
        "name": "miae"
    }],
    "settings": {key=myidrsa}
}


but it showed

screen shot 2018-06-21 at 12 15 03 pm

Is there any way to pass identity_file to code-workspace?

@mkloubert
Copy link
Owner

mkloubert commented Jun 21, 2018

@miaekim

The parameters are for the URI, not for the settings:

{
    "folders": [
        {
            "uri": "sftp://ubuntu@ec2-banana.amazon.com/?key=myidrsa",
            "name": "miae"
        }
    ]
}

@miaekim
Copy link
Author

miaekim commented Jun 21, 2018

Thank you for quick reply!!

screen shot 2018-06-21 at 1 55 00 pm

However I still see that not found error message. Is there step i am missing to run vscode-reomote-ws? because i could connect the ec2 machine with sftp command line

@mkloubert
Copy link
Owner

mkloubert commented Jun 21, 2018

@miaekim

Is the myidrsa file stored inside the .ssh subfolder of your home directory? Or is there another key file you use? Does it need a password / passphrase to access?

Can you try it again by using debug parameter and check your logs inside .vscode-remote-workspace/.logs folder inside your home directory?

{
    "folders": [
        {
            "uri": "sftp://ubuntu@ec2-banana.amazon.com/?debug=1&key=myidrsa",
            "name": "miae"
        }
    ]
}

@miaekim
Copy link
Author

miaekim commented Jun 21, 2018

oh i figured out, i was missing & all the time, T0T thank you for your help!!

@miaekim miaekim closed this as completed Jun 21, 2018
@mkloubert mkloubert added the help wanted Extra attention is needed label Jun 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants