How to use "ssh secure shell" to setup


 
Thread Tools Search this Thread
Operating Systems AIX How to use "ssh secure shell" to setup
# 1  
Old 12-10-2007
How to use "ssh secure shell" to setup

I want do ssh without password from windows to AIX. I can use putty and WinScp tool to do it. However, when I use ssh secure shell, I still need input password to login AIX


I use the following steps to do:

Keys Generated with ssh-keygen2
In order to set up user public-key authentication, do a manual setup according to the following instructions.

The following terms will be used in this example: Remote is the SSH Secure Shell server into which you are trying to connect. RemoteUser is the user name on the server into which you would like to login. Local is the machine running a SSH Secure Shell client. LocalUser is the user name on the client machine that should be allowed to login to Remote as RemoteUser.


To make sure that public-key authentication is enabled, the AllowedAuthentications field in both the /etc/ssh2/sshd2_config file on Remote and in the /etc/ssh2/ssh2_config file on Local should contain the word publickey:

AllowedAuthentications publickey

Other authentication methods can be listed in the configuration file as well.


Create a key pair by executing ssh-keygen2 on Local.
Local> ssh-keygen2
Generating 2048-bit dsa key pair
1 oOo.oOo.o
Key generated.
2048-bit dsa, user@Local, Wed Mar 22 2002 00:13:43 +0200
Passphrase :
Again :
Private key saved to /home/user/.ssh2/id_dsa_2048_a
Public key saved to /home/user/.ssh2/id_dsa_2048_a.pub

Ssh-keygen2 will now ask for a passphrase for the new key. Enter a sufficiently long (20 characters or so) sequence of any characters (spaces are OK). Ssh-keygen2 creates a .ssh2 directory in your home directory (if it is not already present), and stores your new authentication key pair in two separate files. One of the keys is your private key which must never be made available to anyone but yourself. The private key can only be used together with the passphrase. In the example above, the private key file is id_dsa_2048_a. The other file id_dsa_2048_a.pub is your public key, which can be distributed to other computers. Note: Beginning with version 3.0, SSH Secure Shell includes support for RSA keys. They can be generated by specifying the -t flag with ssh-keygen2.
Local> ssh-keygen2 -t rsa
Generating 2048-bit rsa key pair
2 oOo.ooOo.oOo
Key generated.
2048-bit rsa, user@Local, Wed May 02 2002 14:15:41 +0300
Passphrase :
Again :
Private key saved to /home/user/.ssh2/id_rsa_2048_a
Public key saved to /home/user/.ssh2/id_rsa_2048_a.pub

Create an identification file in your ~/.ssh2 directory on Local.
Local> cd ~/.ssh2
Local> echo "IdKey id_dsa_2048_a" > identification

You now have an identification file which consists of one line that denotes the file containing your identification (your private key). For special applications, you can create multiple identifications by executing ssh-keygen2 again. This is, however, not usually needed.
Copy your public key (id_dsa_2048_a.pub) to your ~/.ssh2 directory on Remote.
Create an authorization file in your ~/.ssh2 directory on Remote. Add the following line to the authorization file:
Key id_dsa_2048_a.pub

This directs the SSH Secure Shell server to use id_dsa_2048_a.pub as a valid public key when authorizing your login. If you want to login to Remote from other hosts, create a key pair on the hosts (steps 1 and 2) and repeat steps 3, 4, and 5 on Remote. (Remember to specify a different file name for each key pair.)
Now you should be able to login to Remote from Local using SSH Secure Shell. Try to login:
Local>ssh Remote
Passphrase for key "/home/user/.ssh2/id_dsa_1024_a
with comment "2048-bit dsa, created by user@Local
Wed Mar 22 2002 00:13:43 +0200":

After you have entered the passphrase of your private key, a Secure Shell connection will be established.


Who knows what's wrong it?

Thanks a lot!
# 2  
Old 12-10-2007
First of all, what do you have on AIX? Do you have "OpenSSH" or "ssh2", my AIX 5.1 has OpenSSH.

The setup for OpenSSH is quite different to ssh2, but the two are interoperable, and you can use "putty" to convert keys of one kind into a key for the other.

OpenSSH:

$HOME/.ssh/identity
$HOME/.ssh/authorized_keys

ssh2:

$HOME/.ssh2/identification
$HOME/.ssh2/authorization
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. UNIX for Dummies Questions & Answers

What is the significance of sh -s in ssh -qtt ${user}@${host} "sh -s "${version}"" < test.sh?

Please can you help me understand the significance of providing arguments under sh -s in > ssh -qtt ${user}@${host} "sh -s "${version}"" < test.sh (4 Replies)
Discussion started by: Sree10
4 Replies

3. Shell Programming and Scripting

ssh through "expect" in shell script

Hi, I am trying to use "Expect" in shell script to ssh and do some work in remote server but I am unable to connect. Here is the code I am using. #save as test.sh set ip "10.10.10.10" set username "uname" set password "upass" spawn ssh $username@$ip expect "Password:" send... (8 Replies)
Discussion started by: shekhar2010us
8 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. Shell Programming and Scripting

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

6. UNIX for Advanced & Expert Users

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

7. UNIX for Dummies Questions & Answers

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

8. AIX

"too big" and "not enough memory" errors in shell script

Hi, This is odd, however here goes. There are several shell scripts that run in our production environment AIX 595 LPAR m/c, which has sufficient memory 14GB (physical memory) and horsepower 5CPUs. However from time to time we get the following errors in these shell scripts. The time when these... (11 Replies)
Discussion started by: jerardfjay
11 Replies

9. Shell Programming and Scripting

Help needed with secure shell "sftp"

I am using sftp -V sftp: F-Secure SSH 3.1.0 (build 12) on sparc-sun-solaris2.8 I think it's happening due to secure shell. I can not rename files with "get". As "get" is working fine with open shell sftp. Here are the details about the problem: "get" does not rename the file. It actually... (0 Replies)
Discussion started by: val0822
0 Replies

10. UNIX for Dummies Questions & Answers

No utpmx entry: you must exec "login" from lowest level "shell"

Hi I have installed solaris 10 on an intel machine. Logged in as root. In CDE, i open terminal session, type login alex (normal user account) and password and i get this message No utpmx entry: you must exec "login" from lowest level "shell" :confused: What i want is: open various... (0 Replies)
Discussion started by: peterpan
0 Replies
Login or Register to Ask a Question