OpenSSH for Secure Transmission in Windows and Linux

Source: Internet
Author: User
Article Title: OpenSSH implements secure transmission in Windows and Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Secure File Transfer in Windows and Linux using OpenSSH

Considering the secure transmission of files between windows and linux systems, we are ready to use ssh. OpenSSH is free of charge for windows and linux systems.

In this example, use windows (ip: 192.168.1.25) as the client and linux (ip: 192.168.1.26) as the server. Install the ssh service in linux.

1. Download OpenSSH: http://sshwindows.sourceforge.net/and install. The default installation directory is C: \ Program Files \ OpenSSH.

2. Modify/home (root directory) in the Registry

[HKEY_LOCAL_MACHINE \ SOFTWARE \ Cygnus Solutions \ Cygwin \ mounts v2 \/home]

"Native" = "C: \ Program Files \ OpenSSH \ home"

3. Create the home and username directories under C: \ Program Files \ OpenSSH.

Cd C: \ Program Files \ OpenSSH

Mkdir home

Mkdir home \ Administrator

Mkdir home \ Administrator \. ssh

4. Generate a key

Cd C: \ Program Files \ OpenSSH \ bin

Ssh-keygen.exe d

Generate two Files in the C: \ Program Files \ OpenSSH \ home \ Administrator \. ssh directory

Id_dsa and id_dsa.pub, suffix. Pub is the public key.

5. Copy id-dsa.pub to linux server, can be copied through winscp, is a good windows client tool.

6. Run the command on the linux Server

Cat ~ /. Ssh/id_dsa.pub> authorized_keys

7. Modify the sshd configuration file

Vi/etc/ssh/sshd_config

Set

# PubkeyAuthentication yes

# AuthorizedKeysFile. ssh/authorized_keys

To verify the user identity using the authorized_keys file.

8. Restart the sshd service.

# Service sshd restart

9. Use scp and ssh in windows to log on and copy files. You do not need to enter a password to implement secure file transmission.

> Ssh.exe root@192.168.1.26 # login to the linux Server
> Scp.exe somefile root@192.168.1.26:/root/# copy the file.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.