Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSH on the System i

Status
Not open for further replies.

glistajw

IS-IT--Management
Jun 9, 2002
2
0
0
US
Hello everyone. I've been having a lot of difficulty trying to use the scp command to securely transfer a file from one System i machine to another. I've used the following redbook as a guide:


I've followed chapter 4 to a tee, over and over again, but cannot seem to get this to work. The summary of the whole process is as follows:

1. Create the key pair on the local machine (the guide says to generate an RSA2 keypair which appears to be the default when using ssh-keygen -t rsa...I've tried RSA2, RSA1, and DSA)

2. Manually send the public key (id_rsa.pub) to the remote system via FTP and append it to the authorized_keys file in ~/.ssh using the cat command.

3. On the local mahine, enter "ssh-agent $SHELL", then issue the ssh-add command to add the identities to memory.

4. Use the scp command as such: "scp /home/userdir/file username@remotesys:/home/userdir/file"

I've been using the "-vvv" flag with this command to see what's been going on, and it's always mixed results. When I use an RSA2 key, it's telling me that it's not an RSA1 key:

debug1: identity file /home/JGLISTA/.ssh/id_rsa type 1
debug3: Not a RSA1 key file /home/JGLISTA/.ssh/id_dsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'

Also, further down, it appears as though it's attempting to send my private key as a public key? Why would it do this?

debug1: userauth_pubkey_agent: testing agent key /home/JGLISTA/.ssh/id_rsa


When I generated and used an RSA1 keypair instead, it still didn't work. Does anyone have a clue as to what I'm doing wrong here?

Thanks
 
1. Generate the key pair on the local machine
Code:
ssh-keygen -t rsa

2. Copy the key to the server
Code:
scp /home/[usermame]/.ssh/id_rsa.pub username@server_ip:~/.ssh/authorized_keys
That was how I did it on Cygwin and Ubuntu server
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top