일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
- Windows
- HFS+
- tab space
- intel compiler
- arXiver
- vi
- SSH
- portforwarding
- Anaconda
- conda
- MAC
- HDF5
- python
- gfortran
- Matplotlib
- virtual
- datascience
- mpi4py
- hyperref
- LaTeX
- polyglot
- vim
- GSL
- openmp
- jupyter
- h5py
- cygwin
- c++
- cython
- Visual Studio
- Today
- Total
Astro Coke
[Cygwin] Installing CYGWIN + SSHD for remote access through SSH on windows 본문
[Cygwin] Installing CYGWIN + SSHD for remote access through SSH on windows
astrodoo 2019. 5. 4. 09:34source: https://gist.github.com/roxlu/5038729
1) 우선은 cygwin set-up 실행파일을 통해 openssh 와 cygrunsrv 패키지를 설치해야한다.
2) Configure SSHD
- open a cygwin terminal: start > RIGHT MOUSE ON "Cygwin terminal" AND "RUN AS ADMINISTRATOR"
- $ ssh-host-config
- Are you sure you want to continue: YES
- You have the required privileges: YES
- Overwrite existing /etc/ssh_config: YES
- Should privilege separation be used: YES
- Use local account 'sshd': YES
- Do you want to install 'sshd' as a service: YES
- name CYGWIN: just press enter
- Do you want to use a different name: no
+++ you can skip this ++
- Create new privileged user account (cyg_server): YES
- enter password
- reenter password
+++ end of skip ++
3) Add a SSHD account
- Open control panel
- Create a new account with administrator rights
- set a password for this new account
4) Add the user to SSHD password
$ cd /etc/
$ cp passwd passwd_bak
$ /bin/mkpasswd.exe -l -u [new_username] >> /etc/passwd
(for example: /bin/mkpasswd.exe -l -u roxlu >> /etc/passwd to add the password for roxlu)
5) Open SSHD port (22)
- Open control panel
- Control Panel > Windows Defender Firewall
- 왼쪽 리스트의 Advanced settings 를 클릭한다.
- click: select "Inbound Rules"
- click: New Rule ...
- [x] Port
NEXT
- TCP
Specific ports: 22
NEXT
- [x] Allow the connection
NEXT
- [x] Domain
[x] Private
[x] Public
NEXT
6) Trouble shooting
- first check if you can connect to the SSHD server on the same machine:
- open a Cygwin terminal
$ cygrunsrv -S sshd
$ ssh -l [username] localhost
If you can't connect to the server on localhost check if the sshd daemon is running (see blow)
- check if the SSHD daemon is runing
- open control panel
- search for "services"
- click on "View local services"
- search for "CYGWIN sshd"
- make sure it's there, else try reinstalling sshd
7) Access from remote computer
- open ssh and connect with [new_username], which was created in step 4
e.g.) ssh -l new_username@your_windows_server_ip
'Computer Setup' 카테고리의 다른 글
[Vi] change the file type between dos and unix (0) | 2019.05.10 |
---|---|
[Conda] Remove the environment title in the prompt (0) | 2019.05.05 |
[Vi & Visual Studio] Compatibility of tab space between vi and visual studio (0) | 2019.04.25 |
[OSX&Windows] ._ files in tar from Mac OSX (1) | 2019.04.23 |
[Python] ssh Portforwarding & iPython notebook 서버 접속에서 이용하기 (0) | 2019.04.12 |