diff --git a/app/models/key.rb b/app/models/key.rb
index 8b61675a4447c094f5c05929872117384d3caa6b..3890814cecfab6c2f8d4f547363fe6f4024c6d80 100644
--- a/app/models/key.rb
+++ b/app/models/key.rb
@@ -10,6 +10,7 @@ class Key < ActiveRecord::Base
 
   validates :key,
             presence: true,
+            :format => { :with => /ssh-.{3} / },
             length: { within: 0..5000 }
 
   before_save :set_identifier
diff --git a/spec/factories.rb b/spec/factories.rb
index 929f92959472d877c0c4357a95f4df46805aa472..3f9673b499ecce8d31fd6a77f12f2a4ed47930d3 100644
--- a/spec/factories.rb
+++ b/spec/factories.rb
@@ -77,7 +77,7 @@ FactoryGirl.define do
     title
     key do
       """
-      AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4
+      ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4
       596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4
       soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=
       """