Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7548983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T09:50:08+00:00 2026-05-30T09:50:08+00:00

I need to ssh into a Windows 7 box running MobaSSH as its SSH

  • 0

I need to ssh into a Windows 7 box running MobaSSH as its SSH daemon, and the username on the Windows box contains a space. I can login to the Windows 7 box on an OSX terminal like so:

ssh "Some User"@WindowsHost

So I thought I’d be able to use the scp command on OSX to transfer files between the computers, but I keep getting an error saying “invalid username” whenever I do something like this:

scp myfile "Some User"@WindowsHost:~/myfile

I looked into it and found this question on stackoverflow, but that is mainly about a space within the file paths.

I did find a bug posted about this issue in a specific version of scp, but I’m not sure how to patch scp on OSX. The patch is offered as a .c file.

My last resort is to create a new username on the Windows 7 box and transfer all my profile settings to that new user. It seems like a real hassle given that I can login via ssh, but not scp.

Any tips?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T09:50:10+00:00Added an answer on May 30, 2026 at 9:50 am

    Add a special configuration to your Mac user’s ssh config, usually in ~/.ssh/config

    Host mySpaceyUsernameHost
    User "Some User"
    HostName WindowsHost
    

    You should then be able to scp your file using that named configuration:

    scp myfile mySpaceyUsernameHost:~/myfile
    

    I just tried this on OS X 10.7 (Lion) and it worked from one Mac to another, whereas the other options (quoted, or backlash-escaped) did not…. so that’s something.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I frequently need to ssh into a server, but I can't ssh into it
I'm using a Mac ssh'ing into a headless RedHat box, and I need to
I need to change max_connect_errors on MySQL but I have no SSH control into
I need to create a script that automatically setup a ssh tunnel. I think
I'm working on a Linux machine through SSH (Putty). I need to leave a
Need to locate the following pattern: The letter I followed by a space then
need ask you about some help. I have web app running in Net 2.0.
I need a shell scripting way to determine when a remote linux/OSX has completed
Users will be remotely accessing ***nix based machines via SSH and I need to
In my work with my professor I have to ssh into our server and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.