Hello programming thread. I'm a big dummy with a big dummy question that I would be most grateful to get any help at all.
Decided to sign up for a free 1-year trial with AWS because I'm realizing that experience with this will be helpful for my career (statistician/data scientist).
I've created an ubuntu instance and downloaded a .pem file to connect via ssh (currently using a mac OS X 10.11.4 to connect). For some reason it keeps asking for a passphrase and I have no idea what that could be. Googling has recommended chmod 400 and chmod 600 on the .pem but that hasn't helped.
So I ask with all the humility in the world... help?
Hello programming thread. I'm a big dummy with a big dummy question that I would be most grateful to get any help at all.
Decided to sign up for a free 1-year trial with AWS because I'm realizing that experience with this will be helpful for my career (statistician/data scientist).
I've created an ubuntu instance and downloaded a .pem file to connect via ssh (currently using a mac OS X 10.11.4 to connect). For some reason it keeps asking for a passphrase and I have no idea what that could be. Googling has recommended chmod 400 and chmod 600 on the .pem but that hasn't helped.
So I ask with all the humility in the world... help?
That's odd. Usually that's all you need to log in. Did you set a password anywhere? Maybe try your AWS password?
not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
OS X uses the openssh client, doesn't it? ...and openssh doesn't use pem for its keys
I created a folder in my Documents folder, navigated to it in the terminal, used chmod 400 to make it non public as amazon suggests. Then typed this in the terminal:
ssh -i "FirstKeyPair.pem" ubuntu@ec2-<My Public IP>.us-west-2.compute.amazonaws.com
Also tried without quotes around the .pem file.
Here's the output when I add "-v" to the ssh call:
OpenSSH_6.9p1, LibreSSL 2.1.8
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to ec2-<My Public IP>.us-west-2.compute.amazonaws.com [<My Public IP>] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file FirstKeyPair.pem type -1
debug1: key_load_public: No such file or directory
debug1: identity file FirstKeyPair.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.9
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.4
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.4 pat OpenSSH_6.6.1* compat 0x04000000
debug1: Authenticating to ec2-<My Public IP>.us-west-2.compute.amazonaws.com:22 as 'ubuntu'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client chacha20-poly1305@openssh.com <implicit> none
debug1: kex: client->server chacha20-poly1305@openssh.com <implicit> none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:+MIL8/Zf301kTAu2fSXCNhYxIpByuOnYCzBFD2wQlmE
debug1: Host 'ec2-<My Public IP>.us-west-2.compute.amazonaws.com' is known and matches the ECDSA host key.
debug1: Found key in /Users/<myname>/.ssh/known_hosts:2
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: FirstKeyPair.pem
Saving password to keychain failed
debug1: key_load_private: incorrect passphrase supplied to decrypt private key
Saving password to keychain failed
debug1: key_load_private: incorrect passphrase supplied to decrypt private key
Saving password to keychain failed
debug1: key_load_private: incorrect passphrase supplied to decrypt private key
debug1: No more authentication methods to try.
Permission denied (publickey).
You're using Mac OSX, which has different newlines than Windows/Linux. I suspect that while saving your .pem file it did/didn't translate the newlines correctly.
If your .pem file is "corrupted" and not recognized, it assumes that it must be encrypted and will ask for a passphrase to attempt to sort it out.
Check what newlines you have on your file, and fix them up to a different type. Try downloading the file from Amazon as Text and as Binary to see if either works, etc.
well, great, I was wrong about one thing, openssh does use pem for the private keys (but not for the public keys, which is the only one I ever actually look at)
I'm skeptical it's a newline problem (my version of ssh doesn't care) but I don't have any better ideas, either.
I wish that someway, somehow, that I could save every one of us
Hi all, I've got another Java question for you guys.
In my next assignment, I have to create a TaskScheduler using heap-based priority queues with multiple 'cores'. I'm approaching the problem by creating an ArrayList<ArrayList<Task>> taskList variable to store my sorted tasks, where Task is a class I wrote to hold information. That way if I have 4 cores, then I would have an ArrayList of 4 ArrayLists that store Task objects. Each Task object has its name, release time (time when it's ready to start) and a deadline. Each task takes one unit of time.
Problem: I'm having access issues for an ArrayList and I'm trying to figure out the best way to handle it. For example, let's say I have a 'task' with release time 1 and deadline 2. My first 'core' is full, so I want to add it to the next one, which I haven't created yet. So I call taskList.add(new ArrayList<Task>()) and then try to add my new task, however I can't directly call taskList.get(0).add(1,<Task>).
I know that I can just create an empty Task object to fill this new ArrayList, but is there a better way of doing this?
If you are doing a scheduler with a fixed number of scheduling units (cores) then it makes sense to construct everything at startup, so you would construct your arraylist of arraylists and fill it with the core's arraylist
You're using Mac OSX, which has different newlines than Windows/Linux. I suspect that while saving your .pem file it did/didn't translate the newlines correctly.
If your .pem file is "corrupted" and not recognized, it assumes that it must be encrypted and will ask for a passphrase to attempt to sort it out.
Check what newlines you have on your file, and fix them up to a different type. Try downloading the file from Amazon as Text and as Binary to see if either works, etc.
What should I be looking for? I don't see any "\n" anywhere.
Amazon won't let me download it again.
Should I be keeping the .pem in whatever folder I want or throw it into /Users/<myname>/.ssh ?
Good point! I'm just trying to be more efficient with space wherever possible.
The thing is that each core may or may not actually have a task assigned to them. It's entirely possible for an entire core to be completely empty by the time I finish scheduling tasks. That's why I'm looking at just filling a 'core' up with empty Tasks until I can actually insert a new one.
I suppose I could just pre-allocate empty Task objects to each 'core' and then overwrite as needed. That would also simplify some of my logic, and since adding elements to an ArrayList is O(1) I shouldn't have issues keeping below O(n log n) overall.
You're using Mac OSX, which has different newlines than Windows/Linux. I suspect that while saving your .pem file it did/didn't translate the newlines correctly.
If your .pem file is "corrupted" and not recognized, it assumes that it must be encrypted and will ask for a passphrase to attempt to sort it out.
Check what newlines you have on your file, and fix them up to a different type. Try downloading the file from Amazon as Text and as Binary to see if either works, etc.
What should I be looking for? I don't see any "\n" anywhere.
Amazon won't let me download it again.
Should I be keeping the .pem in whatever folder I want or throw it into /Users/<myname>/.ssh ?
Shouldn't matter where you keep it but make sure you're the owner of the file (chown) from whatever account you're trying to connect from.
What do you get if you "openssl verify FirstKeyPair.pem" ?
So some additional info... when I downloaded the file from amazon, it automatically opened in TextEdit as FirstKeyPair.pem.txt. Then I just changed the extension to FirstKeyPair.pem
not a doctor, not a lawyer, examples I use may not be fully researched so don't take out of context plz, don't @ me
0
GnomeTankWhat the what?Portland, OregonRegistered Userregular
They need to hurry up with the RTM. A lot of libraries we rely on aren't going to release CoreCLR versions until the RTM hits, so we're in this odd holding pattern.
With Javascript/Django, what's a good way to gather client information? We're working on getting two factor authorization but I'm not quite sure how to determine the difference between clients. I've been logging the IP, but if two devices are used in the same building they'd have the same IP so that can't work.
Posts
Found the problem.
I wasn't, apologies if I offended. I thought you are making a joke.
It's cool, I get touchy when I express interest and enthusiasm about things and people think it's a joke.
(read the whole thread for context, the tweet on its own doesn't make much sense)
Decided to sign up for a free 1-year trial with AWS because I'm realizing that experience with this will be helpful for my career (statistician/data scientist).
I've created an ubuntu instance and downloaded a .pem file to connect via ssh (currently using a mac OS X 10.11.4 to connect). For some reason it keeps asking for a passphrase and I have no idea what that could be. Googling has recommended chmod 400 and chmod 600 on the .pem but that hasn't helped.
So I ask with all the humility in the world... help?
That's odd. Usually that's all you need to log in. Did you set a password anywhere? Maybe try your AWS password?
OS X uses the openssh client, doesn't it? ...and openssh doesn't use pem for its keys
I created a folder in my Documents folder, navigated to it in the terminal, used chmod 400 to make it non public as amazon suggests. Then typed this in the terminal:
Also tried without quotes around the .pem file.
Here's the output when I add "-v" to the ssh call:
You're using Mac OSX, which has different newlines than Windows/Linux. I suspect that while saving your .pem file it did/didn't translate the newlines correctly.
If your .pem file is "corrupted" and not recognized, it assumes that it must be encrypted and will ask for a passphrase to attempt to sort it out.
Check what newlines you have on your file, and fix them up to a different type. Try downloading the file from Amazon as Text and as Binary to see if either works, etc.
I'm skeptical it's a newline problem (my version of ssh doesn't care) but I don't have any better ideas, either.
In my next assignment, I have to create a TaskScheduler using heap-based priority queues with multiple 'cores'. I'm approaching the problem by creating an ArrayList<ArrayList<Task>> taskList variable to store my sorted tasks, where Task is a class I wrote to hold information. That way if I have 4 cores, then I would have an ArrayList of 4 ArrayLists that store Task objects. Each Task object has its name, release time (time when it's ready to start) and a deadline. Each task takes one unit of time.
Problem: I'm having access issues for an ArrayList and I'm trying to figure out the best way to handle it. For example, let's say I have a 'task' with release time 1 and deadline 2. My first 'core' is full, so I want to add it to the next one, which I haven't created yet. So I call taskList.add(new ArrayList<Task>()) and then try to add my new task, however I can't directly call taskList.get(0).add(1,<Task>).
I know that I can just create an empty Task object to fill this new ArrayList, but is there a better way of doing this?
What should I be looking for? I don't see any "\n" anywhere.
Amazon won't let me download it again.
Should I be keeping the .pem in whatever folder I want or throw it into /Users/<myname>/.ssh ?
The thing is that each core may or may not actually have a task assigned to them. It's entirely possible for an entire core to be completely empty by the time I finish scheduling tasks. That's why I'm looking at just filling a 'core' up with empty Tasks until I can actually insert a new one.
I suppose I could just pre-allocate empty Task objects to each 'core' and then overwrite as needed. That would also simplify some of my logic, and since adding elements to an ArrayList is O(1) I shouldn't have issues keeping below O(n log n) overall.
Thanks!
Shouldn't matter where you keep it but make sure you're the owner of the file (chown) from whatever account you're trying to connect from.
What do you get if you "openssl verify FirstKeyPair.pem" ?
Do you see something like "- - - - -BEGIN __________- - - - -"?
Try this and see if it likes it better?
There are no instances of '\r' in the file. When I tried your code the start of output.pem file looks like
Your pem isn't saved as plaintext somehow?
I... I don't know.
Original file is FirstKeyPair.pem
When I open it there's no preamble before ----Begin RSA private key----
I typed
Then opened output.pem in TextWrangler. When I open FirstKeyPair.pem in TextWrangler I don't see the preamble.
Edit: Wait, I do
Help.
There is formatting code that you don't see, you need to drop it.
Fucking fuck, what the hell OS X.
Thank you pa thread pals.
Open plain text file with TextEdit, save as?
Not plain text!
Time to measure how good my shit works when data is huge.
Praise honky!
Nice.