1752785 Members
6182 Online
108789 Solutions
New Discussion юеВ

Re: Open SSH

 
SOLVED
Go to solution
hari prasad_4
Advisor

Open SSH

Hi,

I have installed open ssh package in our server and i have started open-ssh's sshd service and i am able to login through ssh.

But i want to know how to enable sftp, what port it is running on, and how to do sftp from windows.

Thanks in Advance,
Hari
13 REPLIES 13
Senthil Prabu.S_1
Trusted Contributor

Re: Open SSH

Hi,
The complete details about using sftp is given below in this link;

http://www.cae.wisc.edu/site/public/?title=linux-sftp

Also, it talks about sending files to windows machine aswell as.

HTH,
Prabu.S
One man's "magic" is another man's engineering. "Supernatural" is a null word.
Vipulinux
Respected Contributor

Re: Open SSH

Hi
Once u install ssh you get sftp as well no need to install anything else. Also sftp uses ssh port so no need to make any changes to port as well.

Cheers
hari prasad_4
Advisor

Re: Open SSH

thanks for replying


can anyone tell me how to generate RSA and DSA key generation proceedure and where to keep keep that file.

thanks in advance,

hari
Alexander Chuzhoy
Honored Contributor

Re: Open SSH

In order to generate keys:
ssh-keygen -t dsa or
ssh-keygen -t rsa

Hope I remembered the command keys right.

Anyway the keys are saved under ~/.ssh directory.

Matti_Kurkela
Honored Contributor
Solution

Re: Open SSH

If you're connecting from Windows to a Linux server running sshd, you'd better create the keys on the Windows client, using whatever method it offers for key generation.

A SSH key consists of two parts, known as "private key" and "public key". When you create a SSH key, both parts are created at the same time.

When you want to use SSH key authentication, you have to copy the public key to the server you're connecting to. The key must be placed in the .ssh subdirectory of the user account you wish to use on the server, into file named "authorized_keys".

The permissions to the home directory of the user account, the .ssh subdirectory and the authorized_keys file *must* be such that nobody other than the user can change the .ssh directory and/or the authorized_keys file. If the permissions are not strict enough, sshd won't trust the key.
No error message will be displayed to the user, as the user's identity is still unconfirmed at that point and sshd is designed to minimize the number of clues given to a possible intruder.

An added complication is that the SSH public keys can exist in two different formats: the OpenSSH format is different from the format used by ssh.com commercial SSH product. Luckily, the formats are easy to convert in both directions.

The easiest way to identify the key format is to check the number of lines: the commercial SSH key is nicely wrapped into multiple lines, each less than 80 characters long. There are also very clear delimiters:
---- BEGIN SSH2 PUBLIC KEY ----

---- END SSH2 PUBLIC KEY ----

The OpenSSH style public key is one *long* line of text.

If your Windows-based SSH client produces the public key in "commercial SSH" format, you can convert it to OpenSSH format on the server using the import option of the ssh-keygen tool:

ssh-keygen -i -f commercial-SSH-key.pub > OpenSSH-key.pub

MK
John Collier
Esteemed Contributor

Re: Open SSH

Wow Matti,

All a person ever wanted to know about SSH vs. OpenSSH + a bowl of soup AND a sandwich!

I would give that explanation 20 points if it were in my power to do so.

This one is going into my list of bookmarks.
"I expect to pass through this world but once. Any good, therefore, that I can do, or any kindness that I can show to any human being, let me do it now. Let me not defer or neglect it, for I shall not pass this way again." Stephen Krebbet, 1793-1855
hari prasad_4
Advisor

Re: Open SSH

Hi All,

Thanks Matti for replying.

I have done everything whatever you have told, but when i connect from putty [using rsa/dsa key], i am getting the below error.

Server refused our key


I am running AIX 5.2 os.

Thanks in advance,
Hari
Matti_Kurkela
Honored Contributor

Re: Open SSH

Check the logs at the server side, if there is any more information, it will be in there. The client will not know why the server refused the key: the server will not tell it to the client, but may tell the reason in a syslog message.

(I don't remember how syslog is usually configured on AIX, it's been too long since I had a chance to do anything on an AIX server).
MK
hari prasad_4
Advisor

Re: Open SSH

hi,

i tried ssh is working from windows and also unix system,
but still i am not able connect sftp.

regards
hari