スキップしてメイン コンテンツに移動

Remote SSH (Ubuntu 20.04, VSCODE)

Reference

https://codechacha.com/ja/ubuntu-install-openssh/

https://pinkwink.kr/1318?category=709117


# SERVER

hpc@hpc-ubuntu:~$ sudo apt update
hpc@hpc-ubuntu:~$ sudo apt install openssh-server
hpc@hpc-ubuntu:~$ sudo systemctl status ssh
● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2022-09-22 10:15:36 JST; 25s ago
       Docs: man:sshd(8)
             man:sshd_config(5)
   Main PID: 5349 (sshd)
      Tasks: 1 (limit: 76692)
     Memory: 1.0M
     CGroup: /system.slice/ssh.service
             └─5349 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups

 9月 22 10:15:36 hpc-ubuntu systemd[1]: Starting OpenBSD Secure Shell server...
 9月 22 10:15:36 hpc-ubuntu sshd[5349]: Server listening on 0.0.0.0 port 22.
 9月 22 10:15:36 hpc-ubuntu sshd[5349]: Server listening on :: port 22.
 9月 22 10:15:36 hpc-ubuntu systemd[1]: Started OpenBSD Secure Shell server.
 
hpc@hpc-ubuntu:~$ sudo systemctl enable ssh
Synchronizing state of ssh.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable ssh
hpc@hpc-ubuntu:~$ sudo systemctl start ssh


# Client with VSCODE

##install extension of remote - ssh



##Ctrl + Shift + P -> Remote SSH: Add New SSH Host.. ->


Input Username@IP address and press 'Enter'


## Ctrl + Shift + P -> Remote SSH: Connect to Host.. ->

select your client ID

 

# Client with terminal

hpc@hpc-ubuntu:~$ sudo apt-get install openssh-client

hpc@hpc-ubuntu:~$ ssh username@xxx.xxx.xxx.xxx
username@xxx.xxx.xxx.xxx's password:
Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.15.0-48-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

2 updates can be applied immediately.
To see these additional updates run: apt list --upgradable

Your Hardware Enablement Stack (HWE) is supported until April 2025.
sip2@sip2-2021:~$ 

sip2@sip2-2021:~$ ip a



 

コメント

このブログの人気の投稿

[참고] ROS kinetic에서 WebCam 사용하기 (Ubuntu 16.04)

Reference: 1. https://github.com/bosch-ros-pkg/usb_cam/issues/53  2. http://zumashi.blogspot.jp/2016/12/ros-kinetic-usb-cam.html  3. http://cafe.naver.com/openrt/5963 위의 사이트들을 참고하여 ROS Kinetic에서 Logitech WebCam C270의 동작을 확인했습니다. $ cd ~/catkin_ws/src $ git clone https://github.com/bosch-ros-pkg/usb-cam.git $ cd .. $ catkin_make WebCam test $ roscore $ rosrun usb_cam usb_cam_node $ rosrun image_view image_view image:=/usb_cam/image_raw $ rosrun rviz rviz 1) By display type>rviz>image 2) Image topic: /usb_cam/image_raw --> 왼쪽 하단과 같이 WebCam이 잘 동작하는 것을 확인했습니다.

[vscode] TImeout waiting for debugger connection

이제까지 잘 동작하던 비주얼 스튜디오 코드가 위와 같은 에러 메세지를 내면서 갑자기 디버깅이 안되서 인터넷을 검색한 결과.. vscode의 User Setting에서 검색창에 python.terminal.activateEnvironment을 입력하여 true로 설정되어 있는 값을 false로 변환하면 된다. 

Anaconda을 이용하여 ROS + Tensorflow 함께 사용하기

-- CUDA, cuDNN 버전확인 https://stackoverflow.com/questions/41714757/how-to-find-cuda-version-in-ubuntu/42122965 $ nvcc --version cuda8.0, cudnn6.0 -- 아나콘다 python2.7 버전 인스톨 https://www.anaconda.com/download/#linux python3.x이랑 ROS 같이 써보려고 했는데, 아직 실력이 부족해서 그런지 실패.. $ bash Anaconda2-5.3.0-Linux-x86_64.sh $ source ~/.bashrc $ python -V Python 2.7.15 :: Anaconda, Inc. $ conda create -n tf14 pip python=2.7 $ source activate tf14 -- ROS 관련 패키지 인스톨 (tf14) $ pip install --upgrade pip (tf14) $ pip install -U rosinstall msgpack empy defusedxml netifaces --CUDA, cuDNN, CPU/GPU을 사양에 맞춰서 tensorflow download https://github.com/mind/wheels#mkl (tf14) $ pip install tensorflow-1.4.0-cp27-cp27mu-linux_x86_64.whl 잘 설치가 되었는지 Hello, tensorflow 실행 (tf14) $ python Python 2.7.15 |Anaconda, Inc.| (default, May  1 2018, 23:32:55) [GCC 7.2.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> i