Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

PuTTY SSH from win 8 to XP


  • Please log in to reply
15 replies to this topic

#1 sniper8752

sniper8752

  • Members
  • 386 posts
  • OFFLINE
  •  
  • Local time:03:03 AM

Posted 16 December 2013 - 06:09 PM

I am trying to connect from my windows 8 machine with PuTTY to ssh in.  I get the error, network timeout.  I am able to ping it. 



BC AdBot (Login to Remove)

 


#2 cryptodan

cryptodan

    Bleepin Madman


  • Members
  • 21,868 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Catonsville, Md
  • Local time:08:03 AM

Posted 16 December 2013 - 06:17 PM

WIndows has no native support for SSHD, and as such that is why you are getting that error.

You will need to install an OpenSSH Compliant server on XP to connect to it.

http://www.ssh.com/index.php/products/tectia-ssh-server.html

#3 sniper8752

sniper8752
  • Topic Starter

  • Members
  • 386 posts
  • OFFLINE
  •  
  • Local time:03:03 AM

Posted 16 December 2013 - 06:31 PM

So I installed OpenSSH for Windows Server, and it tells me that I "MUST edit the C:\OpenSSH\etc\passwd file"; otherwise, I won't be able to login through the server.  When I go to that directory there though, it is not there.



#4 cryptodan

cryptodan

    Bleepin Madman


  • Members
  • 21,868 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Catonsville, Md
  • Local time:08:03 AM

Posted 16 December 2013 - 06:32 PM

What OpenSSH Server can you link me?

#5 sniper8752

sniper8752
  • Topic Starter

  • Members
  • 386 posts
  • OFFLINE
  •  
  • Local time:03:03 AM

Posted 16 December 2013 - 06:35 PM

what do you mean link me?



#6 sniper8752

sniper8752
  • Topic Starter

  • Members
  • 386 posts
  • OFFLINE
  •  
  • Local time:03:03 AM

Posted 16 December 2013 - 06:42 PM

this is what I downloaded: http://sourceforge.net/projects/sshwindows/



#7 cryptodan

cryptodan

    Bleepin Madman


  • Members
  • 21,868 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Catonsville, Md
  • Local time:08:03 AM

Posted 16 December 2013 - 07:18 PM

Right here:

Configuration
-------------
The most important step in getting the server to properly run is to correctly set up the passwd file. The passwd file is equivalent to the /etc/passwd file in UNIX-based systems. You will need to set up the passwd file before any logins can take place.

Passwd creation is fairly easy. The majority of user additions take place through the mkpasswd program. You must also create a group file with mkgroup. Mkgroup is included in the bin directory along with a slightly modified version of mkpasswd. Mkpasswd has been changed to automatically use /bin/switch as the default shell.

The steps to creating proper group and passwd files is outlined below. To add local groups to the group file, you use the -l switch, for domain groups, use the -d switch:
mkgroup -l >> ..\etc\group (local groups)
mkgroup -d >> ..\etc\group (domain groups)

If you use both commands, the group file will contain duplicates. You will need to remove these by hand in a text editor.

You will now need to create a passwd file. Any users in the passwd file will be able to log on with SSH. For this reason, it is recommended that you add users individually with the -u switch. To add ALL users on a system or domain, do not use the -u switch. As with mkgroup, local users are indicated with the -l switch and domain users are indicated by the -d switch. To add domain users from a domain that is not the primary domain of the machine, add the domain name after the user name:
mkpasswd -l [-u <username>] >> ..\etc\passwd (add username to passwd - local user)
mkpasswd -d [-u <username>] >> ..\etc\passwd (add username to passwd - domain user)

The passwd and group files are plain text and can be edited in Vim, Notepad or any text editor. Vim is recommended because it respects the default format of the files.

The last two entries for each user are safe to edit by hand, and can be customized to suit your needs. The second to last entry (/home/username) can be replaced with any other directory to act as that user's home directory (what directory they will be in after they log in). If you will be placing the user somewhere outside the default directory for their Windows profile, you will need to use the cygdrive notation explained below or edit the directory /home maps to. The last entry in passwd is the program that runs when you connect with SSH. The default shell is /bin/switch, which is the best choice for about 99.9% of the accounts you will be adding. Switch.exe allows the use of scp and sftp while still providing the standard command prompt with SSH by switching between sh.exe (scp/sftp) and cmd.exe. If you do not want sftp/scp access for a particular account you can set the shell to /bin/quietcmd.bat, which only runs cmd.exe.

Note that changes made to group are not automatically used by the ssh service. You will need to restart the OpenSSHd service before those changes can be used. Changes to passwd should be automatically used, but restarting the service will help if the changes are not applied automatically.

Located in the readme.txt file in c:\program files\openssh\docs folder

Edited by cryptodan, 16 December 2013 - 07:19 PM.


#8 sniper8752

sniper8752
  • Topic Starter

  • Members
  • 386 posts
  • OFFLINE
  •  
  • Local time:03:03 AM

Posted 16 December 2013 - 08:28 PM

ok - i think i was just confused on how to access those funcitons.  I just switched into that bin directory.  when I get to the mkpasswd, i will be logging in from my laptop, so I want to use domain, right?   I typed in:

C:\OpenSSH\bin>mkpasswd -d [-u username] >> ..\etc\passwd

 

And I got this error:
mkpasswd: [2453] Could not find domain controller for this domain.

 

I don't want local, since I'm logging in from another computer, right?  what am I doing wrong?



#9 cryptodan

cryptodan

    Bleepin Madman


  • Members
  • 21,868 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Catonsville, Md
  • Local time:08:03 AM

Posted 16 December 2013 - 08:35 PM

You want local, as domain is for enterprises and big companies.

#10 sniper8752

sniper8752
  • Topic Starter

  • Members
  • 386 posts
  • OFFLINE
  •  
  • Local time:03:03 AM

Posted 16 December 2013 - 08:43 PM

when i used local, it said:
mkpasswd: A domain name is only accepted when '-d' is given.



#11 cryptodan

cryptodan

    Bleepin Madman


  • Members
  • 21,868 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Catonsville, Md
  • Local time:08:03 AM

Posted 16 December 2013 - 08:45 PM

Is your command like this: mkpasswd -l [-u <username>] >> ../etc/passwd ?

#12 sniper8752

sniper8752
  • Topic Starter

  • Members
  • 386 posts
  • OFFLINE
  •  
  • Local time:03:03 AM

Posted 16 December 2013 - 08:51 PM

shouldn't it be "..\etc\passwd"?  and yes.



#13 sniper8752

sniper8752
  • Topic Starter

  • Members
  • 386 posts
  • OFFLINE
  •  
  • Local time:03:03 AM

Posted 16 December 2013 - 09:06 PM

I do include the [ and ] right?



#14 cryptodan

cryptodan

    Bleepin Madman


  • Members
  • 21,868 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Catonsville, Md
  • Local time:08:03 AM

Posted 17 December 2013 - 06:37 AM

Without the brackets, and perform the group command as well prior to the password one.

#15 sniper8752

sniper8752
  • Topic Starter

  • Members
  • 386 posts
  • OFFLINE
  •  
  • Local time:03:03 AM

Posted 17 December 2013 - 06:02 PM

So I did that, and I get a Connection timeout.  I can still ping it.  I had restarted the xp desktop after I ran that command.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users