0

Desired Behaviour:

I'm setting up a Windows machine next to my Linux machine as a client needs me to use some Windows specific software.

I need to copy a bunch of folders from Linux to Windows 10.

I'm trying to use WinSCP to achieve this, and these are the things I think I need:

IP Address:

ifconfig on Linux machine returns inet addr: 192.xxx.x.x

Whilst googling 'whats my ip' on Linux machine returns 118.xxx.xx.xx

Q01: Which one do I use?

Protocol and Port Number:

Q02: SCP and 22?

Username and Password:

Q03: Do I just use the username and password I usually use to login to my Linux machine?

...A lot of the tutorials I've come across talk about connecting to a Linux computer as a virtual machine, or server, and therefore I'm wondering if I need something to be 'running' on the Linux machine for this to work?

So, last questions:

Q04: Does something need to be running on Linux?

Q05: How do I define which folders will be 'browsable' on the Linux Machine?

What I've Tried:

My last attempt in WinSCP used these credentials:

  • Protocol: SCP
  • Port: 22
  • Hostname: [the inet addr ip from ifconfig]
  • Username: [my normal Linux login username]
  • Password: [my normal Linux login password]

And gave me this error:

Network error: Connection to "192.xxx.x.x" refused.

(Help page for that error)

Edit:

The answer below is more comprehensive, but as a follow up:

I did this on Linux machine:

sudo service ssh start

And got this:

ssh: unrecognised service

So, I had to do this:

sudo apt-get purge openssh-server
sudo apt-get install openssh-server

And then start with:

sudo service ssh restart

And then I used credentials in WinSCP as stated in original post and it worked.

6
  • 2
    Linux Mint 17.3 to Windows 10: both are NOT official Ubuntu sytems so off-topic on Ask Ubuntu
    – Rinzwind
    Mar 30, 2016 at 11:22
  • 1
    @Rinzwind This can be applied word-to-word to Ubuntu.
    – user423626
    Mar 30, 2016 at 11:31
  • 1
    @BharadwajRaju that is not a valid argument: we are an official support site for Ubuntu. Why would we want to support a rip-off? TS should use U&L when it is about more than 1 OS and not Ubuntu anyways.
    – Rinzwind
    Mar 30, 2016 at 12:14
  • @Rinzwind Anyway, the question is now edited.
    – user423626
    Mar 30, 2016 at 12:15
  • @BharadwajRaju They are still not using Ubuntu - edited or not the OP is not on Ubuntu which remains offtopic here (there IS an edit history)
    – Thomas Ward
    Mar 30, 2016 at 12:17

1 Answer 1

3

Question 1:

The second one: 118.xxx.xx.xx - this is your public IP address (although if both computers are on the same network - you may use any of them)

Question 2:

Yes (unless you change it). 22 is the default port for SSH (apparently - SCP too, since it uses SSH for connections). However, many change it to something else to avoid attacks.

Question 3:

Yes.

Question 4:

sshd - the SSH daemon.

  1. Install openssh-server.
  2. Copy the existing /etc/ssh/sshd_config to a backup.
  3. Edit the (non-backup) /etc/ssh/sshd_config
  4. For security, you may want to change Port 22 in the above file to a higher number (2020, for example)
  5. Save.
  6. Allow the port in the firewall - sudo ufw allow {port number}.
  7. Start sshd - sudo service ssh start

Now you can access your computer's files using {port number you chose}

Question 5:

You'll need to use a chroot jail - see this.

Not the answer you're looking for? Browse other questions tagged .