LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-20-2015, 02:24 AM   #1
tranphat
Member
 
Registered: Dec 2013
Posts: 86

Rep: Reputation: Disabled
strange character in private key


Dear all,

Could anyone please help me. I have problem with strange character in my private key.
Here is my command: cat -vet webkey.key
You can see the bad character below:
M-oM-;M-?
-----BEGIN RSA PRIVATE KEY-----$
MIxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I run it with dos2unix command, but still not fix this issue.
How can we remove it? Please advise me.

Last edited by tranphat; 08-26-2015 at 10:43 AM.
 
Old 08-20-2015, 04:41 AM   #2
wildwizard
Member
 
Registered: Apr 2009
Location: Oz
Distribution: slackware64-14.0
Posts: 875

Rep: Reputation: 282Reputation: 282Reputation: 282
1. Don't post private keys to public forums (even fragments of them)
2. Recreate your key (see point 1)
3. When you export your keys do not let them near word processors or other advanced editors that might add UTF-8 BOM chars to the file.
4. To delete such things my personal preference is a decent text editor (jed) which will show those control codes as 3 chars and allow you to delete them as if they were any other character.
 
Old 08-26-2015, 10:42 AM   #3
tranphat
Member
 
Registered: Dec 2013
Posts: 86

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by wildwizard View Post
1. Don't post private keys to public forums (even fragments of them)
2. Recreate your key (see point 1)
3. When you export your keys do not let them near word processors or other advanced editors that might add UTF-8 BOM chars to the file.
4. To delete such things my personal preference is a decent text editor (jed) which will show those control codes as 3 chars and allow you to delete them as if they were any other character.
Hi wildwizard,

1. I understand what you mean. I will be careful.
2,3,4: Yes, it's saved with UTF8 BOM unexpectedly. I saved it again with UT8 Without BOM and it's ok now.

Thank you so much
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
public key VS private key in automation Upendra Pratap Singh Linux - Server 1 05-03-2012 02:59 PM
can we regenerate public key from private key hahacc Linux - Security 1 02-07-2012 09:24 PM
Importing private key from key server ManiDhillon Linux - General 2 07-09-2010 06:56 PM
Public key, private key explained calande Linux - Security 3 06-12-2008 05:23 AM
RSA public key encryption/private key decription koningshoed Linux - Security 1 08-08-2002 07:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration