ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Setting up sftp to use digital key

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Setting up sftp to use digital key

    I am trying to set up sftp to send a file from an v7r3 iSeries to a Linux server running MFT.
    I've been trying to follow Scott Klement's sftp guide.
    When you use ssh-keygen are the keys generated specific to the user profile used to generate it or does it allow any user in the AS400 to use the same key?
    I used another profile to generate the keys and am trying to connect using another profile.

    I sent the .pub file to the server and tried to use
    Code:
    ssh -oPort=8022 user@domain
    to add the authorized keys but I get prompted for a password and when I provide the password it says
    Invalid argument. shell request failed on channel 0
    What am I doing wrong?
    Last edited by JustinWithoutAnE; April 27, 2022, 05:08 AM.

  • #2
    Originally posted by JustinWithoutAnE View Post
    When you use ssh-keygen are the keys generated specific to the user profile used to generate it or does it allow any user in the AS400 to use the same key?
    IBM i, not AS/400.

    It saves the key in the user's home directory, so it'll only work for that user unless you use the "identity file" option like this:

    Code:
    sftp -i /path/to/theusers/key

    Comment


    • #3
      The .pub digital key I generated was already added to the server but when I try to add the site to the authorized keys I still get prompted for password.

      Comment


      • #4
        It looks like I was making a mistake in the generation of the key. I manually created the .ssh folder and enterd a name for the id_rsa file. I think it might have messed up the generation of the keys.

        Comment

        Working...
        X