Digital signature and verification when the keys are in text files

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I generated a key-pair using ssh-keygen. They are in two text files, say "abc.txt" and "abc.txt.pub".
Now, I want to use the private key to sign a document.



I did not find a way to do it with ssh, so I tried to use gpg:



gpg --sign --default-key=abc.txt features-devsite.txt


but got the following message:



gpg: no default secret key: secret key not available
gpg: signing failed: secret key not available


In this question: How to sign files with Ubuntu command-line tools and my own keys? there is a guide on generating keys with GPG, but I do not see how to sign when the key is in an existing text file.







share|improve this question



















  • I'm not sure that GPG keys and SSH keys are directly compatible - see for example GPG & SSH Keys
    – steeldriver
    Jun 1 at 13:21










  • Okay, so regardless of gpg, how can I sign my document with an ssh key?
    – Erel Segal-Halevi
    Jun 1 at 13:24














up vote
0
down vote

favorite












I generated a key-pair using ssh-keygen. They are in two text files, say "abc.txt" and "abc.txt.pub".
Now, I want to use the private key to sign a document.



I did not find a way to do it with ssh, so I tried to use gpg:



gpg --sign --default-key=abc.txt features-devsite.txt


but got the following message:



gpg: no default secret key: secret key not available
gpg: signing failed: secret key not available


In this question: How to sign files with Ubuntu command-line tools and my own keys? there is a guide on generating keys with GPG, but I do not see how to sign when the key is in an existing text file.







share|improve this question



















  • I'm not sure that GPG keys and SSH keys are directly compatible - see for example GPG & SSH Keys
    – steeldriver
    Jun 1 at 13:21










  • Okay, so regardless of gpg, how can I sign my document with an ssh key?
    – Erel Segal-Halevi
    Jun 1 at 13:24












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I generated a key-pair using ssh-keygen. They are in two text files, say "abc.txt" and "abc.txt.pub".
Now, I want to use the private key to sign a document.



I did not find a way to do it with ssh, so I tried to use gpg:



gpg --sign --default-key=abc.txt features-devsite.txt


but got the following message:



gpg: no default secret key: secret key not available
gpg: signing failed: secret key not available


In this question: How to sign files with Ubuntu command-line tools and my own keys? there is a guide on generating keys with GPG, but I do not see how to sign when the key is in an existing text file.







share|improve this question











I generated a key-pair using ssh-keygen. They are in two text files, say "abc.txt" and "abc.txt.pub".
Now, I want to use the private key to sign a document.



I did not find a way to do it with ssh, so I tried to use gpg:



gpg --sign --default-key=abc.txt features-devsite.txt


but got the following message:



gpg: no default secret key: secret key not available
gpg: signing failed: secret key not available


In this question: How to sign files with Ubuntu command-line tools and my own keys? there is a guide on generating keys with GPG, but I do not see how to sign when the key is in an existing text file.









share|improve this question










share|improve this question




share|improve this question









asked Jun 1 at 13:15









Erel Segal-Halevi

84931732




84931732











  • I'm not sure that GPG keys and SSH keys are directly compatible - see for example GPG & SSH Keys
    – steeldriver
    Jun 1 at 13:21










  • Okay, so regardless of gpg, how can I sign my document with an ssh key?
    – Erel Segal-Halevi
    Jun 1 at 13:24
















  • I'm not sure that GPG keys and SSH keys are directly compatible - see for example GPG & SSH Keys
    – steeldriver
    Jun 1 at 13:21










  • Okay, so regardless of gpg, how can I sign my document with an ssh key?
    – Erel Segal-Halevi
    Jun 1 at 13:24















I'm not sure that GPG keys and SSH keys are directly compatible - see for example GPG & SSH Keys
– steeldriver
Jun 1 at 13:21




I'm not sure that GPG keys and SSH keys are directly compatible - see for example GPG & SSH Keys
– steeldriver
Jun 1 at 13:21












Okay, so regardless of gpg, how can I sign my document with an ssh key?
– Erel Segal-Halevi
Jun 1 at 13:24




Okay, so regardless of gpg, how can I sign my document with an ssh key?
– Erel Segal-Halevi
Jun 1 at 13:24















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1042627%2fdigital-signature-and-verification-when-the-keys-are-in-text-files%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1042627%2fdigital-signature-and-verification-when-the-keys-are-in-text-files%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491