»   »   »

Remote access Via SSH or Telnet, FTP or SFTP on Windows XP

Remote access Via SSH or Telnet

There are several ways you can administer a Windows XP machine remotely, I cover 2 here; SSH (Secure Shell) and Telnet (not secure):


SSH can be set up on Windows XP using Cygwin (make sure you Login as Administrator, or as a user with Administrator privileges). Cygwin is maintained by Red Hat.

md c:\cygwin

Download setup.exe from Cygwin into c:\cygwin

Start -> Run -> c:\cygwin\setup.exe

Make sure "Local Package Directory" is c:\cygwin

Click the small "View" button for "Full"

Scroll down to "OpenSSH" line, click on the word "skip" so that an appears in Column B,

Continue with the install, depending on what you selected, and your connection speed, this could take a while.

Once done; Right click "My Computer" -> Properties -> Advanced -> Environment Variables

Select "New" to add a new entry to system variables:

variable name: CYGWIN

variable value: ntsec tty

Right click "My Computer" -> Properties -> Advanced -> Environment Variables

Select the "Path" variable and click the "Edit" button and append ;c:\cygwin\bin to the end of the existing line.

Start -> All Programs -> Cygwin -> Cygwin Bash Shell

type ssh-host-config and answer as follows:

"privilege separation": yes

"local user": yes

"install sshd as a service": yes

"CYGWIN=": ntsec tty

Then type net start sshd OR cygrunsrv --start sshd (to stop the sshd service, type net stop sshd).

To test if the ssh server is working, type: ssh $USERNAME@ (type exit or ctrl-d to exit).

If you have any prolems, type ssh-user-config.

Further things to do:

cp /etc/passwd /etc/passwd.bak
passwd (enter your current Windows password)

For Windows XP SP2:

Control Panel -> Administrative Tools -> Windows Firewall -> Exceptions

Select "Add Port". Name: SSH, Port: 22.

One of the great things about installing SSH is that you get SFTP installed along with it, so in the next section, you don't need to setup the FTP server.

To connect to this machine from another Windows machine, you can use an SSH client like PuTTY, or if you have Cygwin installed, or you're connecting from Linux or another machine with an SSH client installed use: ssh -l username IPAddress (if the username on the remote machine is the same as the username on the machine you're connecting from, you can leave out the "-l username" part.

Note: Once you're connected to the remote machine via ssh or sftp, the directory stucture is a little strange, for example if you want to change to C:\ you yould type: cd /cygdrive/c. You can also sometimes just switch the back-slash to a forward slash; for example \\myserver\c$ would become //myserver/c$, and c:\ would become c:/


If you want to access your machine, but don't want to install Cygwin, setup telnet:

Control Panel -> Administrative Tools -> Windows Firewall -> Exceptions
Select "Add Port". Name: Telnet, Port: 23.
Control Panel -> Administrative Tools -> Services
Right-click on "Telnet" select "Properties"
Set "Startup type" to be Automatic
Click on "Start".
Control Panel -> Administrative Tools -> Local Security Policy
Security Settings -> Local Policies -> Security Options
Right-click on "Network Access: Sharing and security model for local accounts", 
select properties.
Select "Classic - local users authenticate as themselves".

To connect to this machine: telnet -l username IPAddress

Remote access via SFTP or FTP

See the link in the above section.

If you have installed SSH (in the above section), then you can skip this section as you can connect using sftp.

Note: As with Telnet, ftp has its vunerabilities.

Install an FTP Server:

Download Filezilla Server. Configure it to the users on your workstation (don't forget to set passwords and home folders).

To connect from another machine type ftp username@ipaddress

© Roqet :: 2022-03-01 16:07:34