LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-13-2007, 08:20 PM   #1
melvinong
Member
 
Registered: May 2007
Posts: 47

Rep: Reputation: 15
SSH - Auth


in the putty, SSH-Auth Session , in the right hand side i have browse the private key file for authentication:
C:\Key\Putty certificate for inetsrvr\MailServer.ppk
and when i try to browse to E:\ftp2test.ppk.
when i close putty and open back , it came back
C:\Key\Putty certificate for inetsrvr\MailServer.ppk

Does anyone know how to remove the existing C:\Key\Putty certificate for inetsrvr\MailServer.ppk?
because i would like to change it to E:\ftp2test.ppk.
 
Old 11-13-2007, 10:44 PM   #2
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Start putty, select your session from the saved sessions box (right hand side) and click load.
In the left hand pane, select SSH -> auth and select the file using the browse button in the authentication parameters box (right hand side)
In the left hand pane, select session and click the save button at the right hand side.

Not really a linux question
 
Old 11-14-2007, 05:05 AM   #3
melvinong
Member
 
Registered: May 2007
Posts: 47

Original Poster
Rep: Reputation: 15
thanks

Quote:
Originally Posted by Wim Sturkenboom View Post
Start putty, select your session from the saved sessions box (right hand side) and click load.
In the left hand pane, select SSH -> auth and select the file using the browse button in the authentication parameters box (right hand side)
In the left hand pane, select session and click the save button at the right hand side.

Not really a linux question

thank for ur info. it work.
how about the key authentication?
because i don't even know how to generate the key.
is that from the server terminal or from puttygen?
how do i key in the root password in the server terminal or puttygen?
i knew the command ]ssh-keygen -t rsa, but i have no idea how to use it.
really appreciate if you can provide more details...step by step...
 
Old 11-14-2007, 05:52 AM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
ssh-keygen -t rsa generates a public and a private key; I did run it on the server. The pub;lic key needs to be added to the authorized_keys file and the private key can be carried around to other machines.
Code:
wim@webserver233:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/wim/.ssh/id_rsa):
Created directory '/home/wim/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/wim/.ssh/id_rsa.
Your public key has been saved in /home/wim/.ssh/id_rsa.pub.
The key fingerprint is:
9d:b7:00:ec:2d:be:70:ab:17:dd:86:8d:5f:32:64:95 wim@webserver233
wim@webserver233:~$ cd .ssh
wim@webserver233:~/.ssh$ cp id_rsa.pub authorized_keys
wim@webserver233:~$
Copy the id_rsa file (private key) to your windows machine and use puttygen to convert it.

You need to configure the sshd deamon to use key authetication
Code:
# To disable tunneled clear text passwords, change to no here!
# WimS
# enable passwordless login
PasswordAuthentication no
#PasswordAuthentication yes
#PermitEmptyPasswords no
Further you also don't want direct root access as that is what one will try to attack as it's the only know user and it's the user with all powers. root access can be achieved by login as a normal user and next use su - .
Code:
# WimS
# do not allow root login
PermitRootLogin no
#PermitRootLogin yes
You can further limit the users that can login remotely
Code:
# WimS
AllowUsers wim brian
Next restart the sshd daemon or stop/start it. There is a subtle difference: in the first case existing connections are not affected and in the second case any existing connections are killed.
 
Old 11-15-2007, 01:37 AM   #5
melvinong
Member
 
Registered: May 2007
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Wim Sturkenboom View Post
ssh-keygen -t rsa generates a public and a private key; I did run it on the server. The pub;lic key needs to be added to the authorized_keys file and the private key can be carried around to other machines.
Code:
wim@webserver233:~$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/wim/.ssh/id_rsa):
Created directory '/home/wim/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/wim/.ssh/id_rsa.
Your public key has been saved in /home/wim/.ssh/id_rsa.pub.
The key fingerprint is:
9d:b7:00:ec:2d:be:70:ab:17:dd:86:8d:5f:32:64:95 wim@webserver233
wim@webserver233:~$ cd .ssh
wim@webserver233:~/.ssh$ cp id_rsa.pub authorized_keys
wim@webserver233:~$
Copy the id_rsa file (private key) to your windows machine and use puttygen to convert it.

You need to configure the sshd deamon to use key authetication
Code:
# To disable tunneled clear text passwords, change to no here!
# WimS
# enable passwordless login
PasswordAuthentication no
#PasswordAuthentication yes
#PermitEmptyPasswords no
Further you also don't want direct root access as that is what one will try to attack as it's the only know user and it's the user with all powers. root access can be achieved by login as a normal user and next use su - .
Code:
# WimS
# do not allow root login
PermitRootLogin no
#PermitRootLogin yes
You can further limit the users that can login remotely
Code:
# WimS
AllowUsers wim brian
Next restart the sshd daemon or stop/start it. There is a subtle difference: in the first case existing connections are not affected and in the second case any existing connections are killed.
elo!

#cp id_rsa.pub authorized_keys
actually what is the command for this use for?
why do we need authorized_keys since we only id_rsa will copy to windows machine only.
 
Old 11-15-2007, 01:58 AM   #6
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
I don't know as I'm not familiar with the internals of ssh. I only found out that it does not work if you don't add it to the authorized_keys.

I assume that one user can have multiple keypairs (for some reason) in which case they all can be in authorized_keys.
 
Old 11-15-2007, 02:59 AM   #7
melvinong
Member
 
Registered: May 2007
Posts: 47

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Wim Sturkenboom View Post
I don't know as I'm not familiar with the internals of ssh. I only found out that it does not work if you don't add it to the authorized_keys.

I assume that one user can have multiple keypairs (for some reason) in which case they all can be in authorized_keys.
ok..thanks for ur info & help anyway...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
open-ssh vs. commercial ssh (tru64), public-key auth not possible? cf050 Linux - Networking 8 03-28-2012 11:15 AM
Problems with SSH Auth Aquilaservers Linux - Security 8 09-21-2006 11:15 PM
SSH Rsa Auth fail... eluzi Linux - Security 4 03-13-2006 12:50 PM
SSH RSA Auth lil_drummaboy Linux - Networking 2 11-27-2005 06:42 PM
Connect ssh with auto auth Drunkalot Linux - Networking 1 01-19-2005 06:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration