Linux to Windows SCP password-less access - linux

I have a raspberry pi running Linux (Jessie) which takes pictures every hour and is supposed to upload it onto a windows server. I want to set up a password-less SSH access so that I can upload pictures from the raspberry pi to the windows using SCP. Most of the tutorials online deal with copying files from Linux to Linux environments or windows to Linux set-ups. How do I set up password-less access FROM Raspberry pi to Windows? Should I generate key pairs on windows or raspberry pi? I am also having confusion as to where does the public/private keys resides (windows server or Linux client)?

You may install Cygwin on the Windows side, then you will get the environment similar to Linux on Windows. The keys can be generated on the Linux side and copied to the Windows, location is the same as in the Linux (/.ssh).
There are several tutorials on Cygwin with private key authentication, like this one: https://dbaportal.eu/2015/03/06/setup-openssh-cygwin-for-public-key-authentication/
Note that you will probably have to set up proper access rights for .ssh directory in Windows. You may use chmod in the same way as on Linux, set 700 for .ssh directory and 600 for authorized_keys.

Related

Recover Windows Subsystem Root User Password for Linux

I use linux bash on my windows machine with developer mode windows subsystem setup for linux. I followed this guide to install and configure sudo: https://linuxhint.com/run-sudo-command-windows/ but I forgot my password and I don't know how to reset it. Since I don't use a GUI distribution of ubuntu I can't use the LIVE CD nor can I use the GRUP bootloader. What options do I have?

Is it possible to execute sh files GUI application from linux remote server and view it on local machine?

I have a job that runs denodo platform on remote server. Sh files is a GUI application, and I have to run it to start denodo service. I can't access it in windows, is there a way to solve these problems?
Already running sh files on Putty Windows, but only return null.
If it's a linux GUI application, you should "export display" to view the server screen on your workstation.
Depending of your workstation linux distribution, it might be as easy as :
xhost +<IP_address_of_workstation>
./runMyApp.sh
As your workstation is running windows operating system, you have do further configuration :
https://superuser.com/questions/325630/how-can-i-export-display-from-a-linux-terminal-to-a-windows-pc
https://seanthegeek.net/234/graphical-linux-applications-bash-ubuntu-windows/
If your workstation is connected through SSH you need even more configuration as discussed here : https://unix.stackexchange.com/questions/12755/how-to-forward-x-over-ssh-to-run-graphics-applications-remotely
You can run GUI-Applications of remote linux host in a windows client via ssh (putty) with x-forwarding and an installed x-server (xming)
See this question:
https://superuser.com/questions/299158/how-to-make-putty-do-the-equivalent-of-ssh-x

remote command on windows from linux

I want to run windows command on windows 2003 server from RHEL machine.
I tried one way to do it using winexe and it is working as expected. However to do this one I have to keep 139 port open and apparently this is a very vulnerable port and is advised not to be kept open.
One other way I found was to use cygwin and open ssh packages but these are again not supported in windows 2003 server.
Can anyone please suggest me any other way leaving these 2 to connect linux and windows machine and run command on cmd.exe from linux terminal.
You can emulate the whole Windows on RHEL using the Wine software. So you won't need to connect anywhere.
Other option is to connect from RHEL to Windows 2003 Server via an SSH.
Installing of an OpenSSH server on Windows has a couple of quirks:
in Windows settings you have to allow your account to run services
in the sshd config file of the OpenSSH server you have to set the StrictModes option to no, so you can use the SSH authentication by public/private keys

How to send file over local network from a windows machine to a linux machine?

I am asked to send a text file from a computer from a windows machine to a linux machine,a raspberry pi model b to be exact . Knowing that they are on the same local network, what are the steps to do in order to enable such a manipulation?
Try pscp:
Download and run putty installer: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html, then in your windows terminal type:
Program Files( x86)\PuTTY\pscp.exe <path_to_file_to_be_copied> <user>#<ip_addres_of_your_raspberry>:<path>
Example:
pscp.exe C:\Users\SantaClaus\Desktop\someText.txt santaClaus#10.2.3.4:/home/santaClaus/

Copying file from Desktop to Virtual Server LINUX

I have researched and only see answers on how to do this on windows, so here are my details.
I am using mac os X .. And I am connecting to a virtual server via VPN. My problem is I have files on the desktop of my mac that I need to get to the Virtual server on the VPN. How can this be accomplished. They are not on the same network, or IP range. I heard you should install a webserver onto the virtual server in order to accomplish this. Does anyone have experience with this or can provide any assistance would be greatly appreciated.
OS X includes the scp command that can be used to copy files to a virtual server assuming that it is a Linux system running SSH. For example, this terminal command will copy the file "my_file.txt" from the current directory to username's home directory on the server. The colon at the end of the command is important.
scp my_file.txt username#virtual.server.ip.address:
The scp and sftp instructions here apply to OS X as well as Linux.
https://help.ubuntu.com/community/SSH/TransferFiles

Resources