linux - Windows equivalent of SSH

17
2014-04
  • Questioner

    I don't know Windows very well and only vaguely know my way around the Command Prompt.

    Is there an equivalent to SSHing into another Windows computer via cmd? Equivalents to SCP and other Linux commands would be nice as well.

  • Answers
  • 8088

    PuTTY for shell access.

    enter image description here

    WinSCP (UI, no cmd) for file transfers.

    enter image description here

  • vjones

    In order to connect another Windows computer using SSH, an SSH server would have to be running on the that computer. SSH isn't part of Windows, so this would have to be installed and configured. Take a look at Cygwin if this is what you're interested in doing. (Cygwin will also provide you a more familiar feeling command-line SSH, as well as other familiar Unix tools.)

    If you're looking for the "Windows way" of doing these things, have a look at Remote Desktop (although it is graphical, not command-line based).

    You can enable Remote Access on the target machine which will allow you to connect to it with Remote Desktop. You can also transfer files back and forth by mapping a drive back to your own computer if you configure your connection to allow access to local resources.

  • grawity

    PowerShell comes with Remoting capabilities in WinRM:

    PS C:\> enter-pssession otherhost
    

    In XP, you could use PSExec, but this is only recommended over secure LANs:

    psexec \\otherhost cmd
    
  • Duijf

    I've always felt uncomfortable advising the use of Cygwin for one single function. There is an alternative, however: freeSSHd. The project, unfortunately, is quite inactive, but it should be a match to Cygwin, especially if you don't want to clutter your PATH and other variables.

    When installed and configured, you can use PuTTY for ssh access.

  • OldWolf

    +1 The PuTTY developer also provides pscp (for scp) psftp (for sftp) and several other programs for agents etc.. (See the Downloads section for details on the programs) For more traditional *nix commands, you can download Cygwin (which also has scp etc..) or, if you're trying to transition into the windows world depending on your windows version, powershell can make the transition, from a scripting and command aliasing position, a little less painful.


  • Related Question

    linux - How do I connect to an SSH server from Ubuntu?
  • codeLes

    I've been given this information (changed to protect the innocent):

    Hostname: secret_server.homeserver.org
    Port: 4033
    Username: user
    Password: $ecrectP#ras3
    Protocol: scp
    

    I don't have to have a nice GUI. What's the key to connecting to this server? I understand that SCP will copy files from a source directory to my target directory (both ways). How can I connect via SSH to this server so I can traverse the directories and find the files I need?

    the following terminal command just times out:

    ssh -p 4033 user@secret_server.homeserver.org
    

    is it me or the server?


  • Related Answers
  • Juha Syrjälä

    If the connection just times out, there may be some network problem. For example, some firewall blocks the connection.

    Can you ping the server?

    ping secret_server.homeserver.org
    

    In addition, ssh connection may be blocked, and only file copying with scp is allowed.

    Does it work if you use scp to copy files?

  • pgs

    Protocol: scp

    It's possible that they've enabled only scp, and that ssh remains disabled.

  • heavyd

    If you can't get in using ssh, sftp still might be an option. It's not a full shell but at least you can traverse directories, list files and transfer them.

    sftp -oPort=4033 user@secret_server.homeserver.org:/path_to_destination/
    
  • Richard Hoskins
    scp -p 4033 file_to_copy user@secret_server.homeserver.org:/path_to_destination/