public key or private key as a password of connect to remote database, ssh

aln

I have a .ppk file which contain public key and private key, I want to make a connection to the remote database ssh( in my java program) , but I don't know, for this connection, I have to use public key as password or private key?

aln

Finally, I found my answer, for my connection , firstly I made a public and private key for the server(server A) that has my java code, with this command

ssh-keygen -t rsa

this command generate public and private key. and then I put my public key in the server which has my database(server B), in the .ssh folder (/home/user/.ssh)

so I connected to the database with the ssh

>ssh  username@ip 

and finally I put my private key in my java-code which helped me to connect to the database server(server B) from code-server(server A)

this links is helpful:

http://www.linuxproblem.org/art_9.html ,

https://kb.iu.edu/d/aews

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Unable to connect to remote server via SSH (requires public key)

From Dev

Unable to connect to remote server via SSH (requires public key)

From Dev

Cannot connect with private key if the public key exists

From Java

SSH: In private network how to access the remote machine from source machine without using ssh public key

From Dev

Unable to connect to Linode with public/private key

From Dev

Unable to connect to Linode with public/private key

From Dev

Copying public key into remote node without password

From Dev

SSH authentication by public key and password in the same time

From Dev

SSH public key added but still prompt for password

From Dev

Setup SSH public key for login without password

From Dev

Unable to Change Password for Private SSH Key

From Dev

Test if SSH private key has password protection

From Dev

What's the password of an SSH private key?

From Dev

SSH with private key always require password

From Dev

How to ssh to remote server using a private key?

From Dev

Do I have to create a new private an public key if I want to connect by ssh in the opposite way?

From Dev

SSH key accepted but remote host asks for password

From Dev

ssh key exists on remote, but still prompts for password?

From Dev

How do I retrieve the public key from a SSH private key?

From Dev

How do I retrieve the public key from a SSH private key?

From Dev

ssh get old public key from backed up private key

From Dev

When exactly does SSH-agent use my private_key to connect to a remote server?

From Dev

Connecting to remote PostgreSQL database with SQLAlchemy using SSH tunneling with public key and passphrase, all that from a Windows machine

From Dev

RSA private key and public key

From Dev

Private key length > public key?

From Dev

Extensions for Private and Public Key

From Dev

Why can I login remote host without password or private key?

From Dev

AWS SSH connect from OSX keep asking for password for SSH Key

From Dev

Can I change the filename of my ssh public/private key pair?

Related Related

  1. 1

    Unable to connect to remote server via SSH (requires public key)

  2. 2

    Unable to connect to remote server via SSH (requires public key)

  3. 3

    Cannot connect with private key if the public key exists

  4. 4

    SSH: In private network how to access the remote machine from source machine without using ssh public key

  5. 5

    Unable to connect to Linode with public/private key

  6. 6

    Unable to connect to Linode with public/private key

  7. 7

    Copying public key into remote node without password

  8. 8

    SSH authentication by public key and password in the same time

  9. 9

    SSH public key added but still prompt for password

  10. 10

    Setup SSH public key for login without password

  11. 11

    Unable to Change Password for Private SSH Key

  12. 12

    Test if SSH private key has password protection

  13. 13

    What's the password of an SSH private key?

  14. 14

    SSH with private key always require password

  15. 15

    How to ssh to remote server using a private key?

  16. 16

    Do I have to create a new private an public key if I want to connect by ssh in the opposite way?

  17. 17

    SSH key accepted but remote host asks for password

  18. 18

    ssh key exists on remote, but still prompts for password?

  19. 19

    How do I retrieve the public key from a SSH private key?

  20. 20

    How do I retrieve the public key from a SSH private key?

  21. 21

    ssh get old public key from backed up private key

  22. 22

    When exactly does SSH-agent use my private_key to connect to a remote server?

  23. 23

    Connecting to remote PostgreSQL database with SQLAlchemy using SSH tunneling with public key and passphrase, all that from a Windows machine

  24. 24

    RSA private key and public key

  25. 25

    Private key length > public key?

  26. 26

    Extensions for Private and Public Key

  27. 27

    Why can I login remote host without password or private key?

  28. 28

    AWS SSH connect from OSX keep asking for password for SSH Key

  29. 29

    Can I change the filename of my ssh public/private key pair?

HotTag

Archive