I'm using MSYS in windows 7 and now i need it to provide ssh server service. can openssh be installed in msys like it is in cygwin?
i can find ssh in /msys/bin, and it can be used as ssh client. but no server seems to be installed. how can i install one? i googled a lot but almost every theads leads to openssh in cygwin, that does not apply to my situation.
i compared cygwin and msys and decide to use msys. We need to run some applications both built and supposed to be ran in windows.
what i've tried:
mingw-get install mysys-openssh
test#WIN-L3L622JBT6G ~
$ mingw-get install msys-openssh
install: openssh-5.4p1-1-msys-1.0.13-bin.tar.lzm
installing openssh-5.4p1-1-msys-1.0.13-bin.tar.
install: openssh-5.4p1-1-msys-1.0.13-doc.tar.lzm
installing openssh-5.4p1-1-msys-1.0.13-doc.tar.
install: openssh-5.4p1-1-msys-1.0.13-lic.tar.lzm
installing openssh-5.4p1-1-msys-1.0.13-lic.tar.
test#WIN-L3L622JBT6G ~
$ openssh
sh: openssh: command not found
the package seems to be installed but i don't know how to find the service. do i need to link it or modify the profile?
The answer would be "NO".
Msys provide ssh client but not ssh server, as it's document indicates.
And Openssh cannot be installed on windows without cygwin. you can install a full cygwin and install openssh in cygwin. It's also feasible to only install partial cygwin.
Msys is outdated. Use Msys2, which does support sshd: https://www.booleanworld.com/get-unix-linux-environment-windows-msys2/
Related
The git-crypt instructions exist for Linux and MacOS, but for Windows these seem to be omitted. How to install Git-crypt on Windows?
There are other approaches, but I like msys2:
Install msys2:
http://www.msys2.org/
Open a msys2 terminal. Then ...
Install g++ for windows, following the instructions here:
https://github.com/orlp/dev-on-windows/wiki/Installing-GCC--&-MSYS2
Be sure /mingw64/bin is in your path. (e.g. which g++)
git clone git#github.com:AGWA/git-crypt
cd git-crypt
make LDFLAGS="-static-libstdc++ -static -lcrypto -lws2_32"
I would not trust the Repository git crypt for Windows that was mentioned.
I finally just managed to build git-crypt myself. And the Difference of the Size between this two Binaries is huge.
My self compiled Version is something around 370 kb compared to the 5.7 Mb from the One on GitHub.
Thanks for the Answer
Thumbs Up
with msys2 you can:-
pacman -S git-crypt
to install without needing to build it.
Check out git crypt for Windows. Consider whether you trust unsigned files from the internet (keep in mind git crypt itself is unsigned and you likely haven't reviewed the source)
For Windows 10 there is an alternative that should make things a bit easier using WSL (Windows Subsystem for Linux). This will avoid the need to compile anything.
If you do not have WSL enabled see Microsoft docs guide. I would also recommend installing the latest LTS edition of Ubuntu from the Microsoft Store app (any edition of Ubuntu will do).
Install Git Crypt
Once you have a working copy of Ubuntu for WSL, open it and run the following commands.
sudo apt-get update
sudo apt-get install git-crypt gnupg
Use Git Crypt
Now all that you need to do is access your Windows files from within Ubuntu by looking in /mnt/. Then you can use git-crypt as normal from within WSL.
I have downloaded git-crypt.exe from here and placed it in the C:\Program Files\Git\cmd\git-crypt.exe ! This solved my issue !
As proposed by mikemaccana
IN WINDOWS
I have downloaded git-crypt.exe from here and placed it in the C:\Program Files\Git\cmd\git-crypt.exe ! This solved my issue !
Note: The git crypt repo now has windows binaries under releases
https://github.com/AGWA/git-crypt/releases/tag/0.7.0
In the packages window of CygWin, when I type sshpass, nothing comes up. I tried installing similar packages like openssh etc hoping one of them contains sshpass but no luck.
sshpass is not available as Cygwin package. This means that you need to build and install from source. To build sshpass on Windows (Cygwin):
$ curl -LO http://downloads.sourceforge.net/sshpass/sshpass-1.06.tar.gz
$ md5sum sshpass-1.06.tar.gz
f59695e3b9761fb51be7d795819421f9
Build and install to /usr/local/bin:
$ tar xvf sshpass-1.06.tar.gz
$ cd sshpass-1.06
$ ./configure
$ make
$ sudo make install
Which installs two files
the executable /usr/local/bin/sshpass
man page /usr/local/share/man/man1/sshpass.1
Your Cygwin install needs to have the required tools: curl to download, tar to extract, and autoconf, make and gcc to build. I'll assume reader familiarity with installing packages on Cygwin.
sshpass is not available as cygwin package. This means that you need to build and install from source.
See for reference on existing alternative
https://www.cygwin.com/ml/cygwin/2015-02/msg00042.html
This does not directly answer the question "How to install sshpass on Windows?", but can be much easier solution if you need to automatically enter the password when ssh-ing to a machine on Windows system, you can use Plink (part of PuTTY).
plink your_username#yourhost -pw your_password
Window 10 comes with Linux subsystem, you can install a favor of Linux through Windows Store. Then all Linux commands comes easily. sshpass can be easily installed in the subsystem. WSL(Windwos Subsystem for Linux) is the future.
I have build a website with Erlang and Cowboy with ErlyDTL on a Linux OS.
Now I want that my website can run on Windows and want to use the Erlang.mk with Relx build tool.
When I give the make command it gives me the error:
Unable to detect platform. Please open a ticket with the output of
uname -a.
uname -a output:
MINGW32_NT-6.2 LENOVO-... 2012-11-21 22:34 i686 Msys
How can I fix this problem in a easy way with explanation because I don't know much of makefiles ;).
Specs:
I have Windows 8.1 64 bit OS.
My Erlang.mk is version 1.2.0-634-g2f69190.
I installed MinGW with msys so I can run make and make distclean.
I have the following extra packages installed during this intallation:
mingw-developer-toolkit
mingw32-base
mingw32-gcc-g++
msys-base
So the PATH to MinGW is c:\MinGW.
With CMD I started C:\MinGW\msys\1.0\msys.bat
Then with the bash shell I ran de postinstall script pi.sh. This gave me no errors.
Then I have installed some extra packages for MinGW with success:
mingw-get install msys-rxvt
mingw-get install msys-unzip
mingw-get install msys-zip
mingw-get install msys-wget
I have red https://github.com/ninenines/erlang.mk/issues/294 but I couldn't understand what I have to do because the lack of explanation.
So is there a solution? If yes what is it and please give some explanation with it so I can fix my problem and understand what I'm doing.
Thanks in advance
I am currently trying to install and update a few packages on a Windows OS. The only matter is that I am using Cygwin in order to type the commands through a terminal (as I'm aware, I can type in Linux type commands such as cd, ls etc. on Cygwin - I may be wrong). However, when I try to install a package like:
sudo apt-get install paparazzi-dev
I get the reply:
-sh: sudo: command not found.
Does anyone have an idea as to how I can fix this problem?
Run cygwin as administrator.. then you wouldn't need any sudo command.
Cygwin is not a full Linux distribution. Therefore you don't have sudo or the Debian/Ubuntu package manager apt-get. There is a number of packages available from the Cygwin repository: http://cygwin.com/packages/
You have to chose these packages during setup.
Windows does not have sudo, apt, or almost any Linux commands to be exact. Cygwin may allow some, but as programs are not installed on Windows as packages apt-get will not work. Windows programs have installers as .exe or .msi instead.
The Windows version of sudo is called runas in case you need to run something as another user. Or, you can run Cygwin as administrator.
If you have to use the packages you need Linux. You can install it directly to replace Windows, dual-boot or use a virtualization software like VMware VirtualBox.
Making out an explanatory answer from answer here by #Aimal as it worked for me.
Cygwin may not get permissions to create folders and files when run by clicking Cygwin icon that's in normal mode.
Cygwin gets the right authorization only when right click -> "run as adminitrator" on cygwin icon because of that it gets permissions to create folders and files.
Cygwin lets you run certain commands, such as cd, ls, or mv; but it doesn't let you run other commands, such as sudo or apt-get.
If you're trying to add a package to your Cygwin installation, rerun Cygwin Setup. It may still be in your "Downloads" folder. Go through all the steps again. The Cygwin installer will automatically download and install the package you want, and add it to your Cygwin installation. (I think it will probably also upgrade all your other installed Cygwin packages to the latest available versions.)
If your desired package isn't on the Cygwin package list but is on the Cygwin Ports package list, follow the Cygwin Ports installation instructions. Note that Cygwin Ports is separate from Cygwin. Please do not send messages about Cygwin Ports packages to the cygwin.com mailing lists.
If you have years of Linux experience, you may be able to compile the software you want inside Cygwin. This can be challenging.
Perhaps an option simpler than "compile it yourself" is this: You can install VirtualBox, then install your favorite Linux distribution inside the virtual machine, then install your desired package inside Linux. (I like Ubuntu Linux, which has more than 27,000 packages in its "Universe" repository.) Now you can run Linux and Windows at the same time.
I think I tried steps below after doing some research & succeeded (on windows)
1.Install scoop using powershell 3 (iex (new-object net.webclient).downloadstring('https://get.scoop.sh'))
2. do scoop install --global sudo
3. make sure paths (C:\Users\\scoop\shims & C:\ProgramData\scoop\shims) added in environmental path variable.
In my case, I wanted to install curl, but could not create directory /usr/local/curl/lib when running command "make install", because of permission deny. so i need to change /usr/local permission. when i run sudo chmod 755 /usr/local, sudo command not found.
after searching a few solution, found that sudo is not installed by default in Cygwin. But I tried the solution that Aimal gave which is to run Cygwin as administrator. I finally can change the folder permission. Thanks Aimal.
Note: I'm not sure if this belongs on ServerFault or StackOverflow
I'm currently working on a project which has an SFTP-only bzr repository. All works fine using my Linux machine, but when using Windows with Cygwin I get the following issue:
$ bzr checkout sftp://user#hostname/var/bzr/project
bzr: ERROR: Unsupported protocol for url "sftp://user#hostname/var/bzr/project": Unable to import paramiko (required for sftp support): No module named Crypto
I have installed Cygwin's python-paramiko package, so I'm not sure why it's refusing to use it.
Any suggestions much appreciated.
Clarification: This does work with Windows bazaar GUI tool & Windows cmd shell, I'm just wondering if I can make it work in Cygwin as I prefer UNIXy command line tools.
Played around with this today.
Had to install python-crypto which should be a prerequisite of python-paramiko but isn't.