how to setup an SSHD server on Windows XP

Leave a comment

May 29, 2009 by Administrator

Problem:
I needed information on how to administer a Windows XP. Prof. machine via command-line and remotely, from another Windows machine. My search led me to download and Install OpenSSH for Windows. Heres how :

Solution
note: you must have at least 2-computer systems to get things done.

1) download (click ‘binary installer releases‘) OpenSSH dot zip file.  Extract/decompress the downloaded file with WinZIP.

2) double-click the executable file and click next >> accept terms….>> select components to install:
note: the downloaded executable file contains the SSH client and server side of the application.
Uncheck ‘server’ to install the client side of the software on the client-machine. Click next to complete the installation.
– Follow the same procedure(uncheck ‘client’ to install the server-side of the application on the destination machine/s you will be remotely connecting to).
note: click OK when you’ll get a prompt to edit C:\Program Files\OpenSSH\etc\passwd file………click ‘Finish’.

On your SSH server / each server on which OpenSSH is installed, you need to add authorized users. Refer to the quickstart.txt guide that comes with the installation:

3)  Open a command prompt and change to the installation directory (Program Files\OpenSSH is the default).

4)  CD into the bin directory.

5)  Use mkpasswd to add authorized users into the passwd file. For local users, use the “-l” switch. Type the command
mkpasswd -l -u <username> ..\etc\passwd
where ‘username’ is an authorized user on the SSH server. The command adds a ‘passwd’ file to the DIR(C:\Program Files\OpenSSH\etc).

6) restart the SSH server using the command:
net start opensshd

7). Rather than using the SSH client, I used putty to connect to the SSH server. Download here.
note: your machines must each have an IP address and must be in a networked environment.

Now our SSH server is all set up and working huh!!

example: to share a file on the remote server, fire up Putty, or any SSH client, connect to the server. You’ll be prompted for your username and password.

create a directory named: test999:
C:\>mkdir test999

share the created DIR:
C:\>net share shared1=D:\test999

where ‘shared1’ is the sharename of directory test999, created in the D drive.

to see your created shares, and other default shares on your computer, use the command: net share

Now, you can access your remote computer from the start >> run >> open>>type IP address/computername, and your newly shared DIR will be available remotely for drag and drop / copy pasting.

To unshare / delete your newly created share:
D:\>net share shared1 /delete
shared1 was deleted successfully.

More information on the net share command:

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: