Class: Plus4uCodebase::Security::SSHKey
- Inherits:
-
Object
- Object
- Plus4uCodebase::Security::SSHKey
- Defined in:
- lib/plus4u_codebase/security/ssh_key.rb
Overview
Ssh key generated by #generate_key method.
Instance Method Summary collapse
-
#bits ⇒ Fixnum
Determine the strength of the key in bits as an integer.
-
#initialize(ssh_key) ⇒ SSHKey
constructor
A new instance of SSHKey.
-
#private_key ⇒ String
Returns private ssh key as String.
-
#public_key ⇒ String
Returns public ssh key as String.
-
#randomart ⇒ String
Generate OpenSSH compatible ASCII art fingerprints.
-
#type ⇒ String
Ssh key type.
Constructor Details
#initialize(ssh_key) ⇒ SSHKey
Returns a new instance of SSHKey
9 10 11 |
# File 'lib/plus4u_codebase/security/ssh_key.rb', line 9 def initialize(ssh_key) @ssh_key = ssh_key end |
Instance Method Details
#bits ⇒ Fixnum
Determine the strength of the key in bits as an integer.
66 67 68 |
# File 'lib/plus4u_codebase/security/ssh_key.rb', line 66 def bits @ssh_key.bits end |
#private_key ⇒ String
Returns private ssh key as String.
37 38 39 |
# File 'lib/plus4u_codebase/security/ssh_key.rb', line 37 def private_key @ssh_key.private_key end |
#public_key ⇒ String
Returns public ssh key as String.
23 24 25 |
# File 'lib/plus4u_codebase/security/ssh_key.rb', line 23 def public_key @ssh_key.ssh_public_key end |
#randomart ⇒ String
Generate OpenSSH compatible ASCII art fingerprints.
51 52 53 |
# File 'lib/plus4u_codebase/security/ssh_key.rb', line 51 def randomart @ssh_key.randomart end |
#type ⇒ String
Ssh key type. Can be RSA or DSA.
80 81 82 |
# File 'lib/plus4u_codebase/security/ssh_key.rb', line 80 def type @ssh_key.type end |