ubuntu 22.04로 올렸더니 git에서 받으려고 시도했으나 실패해서

옆자리 동료에서 물어보니 ssh 보안관련 문제라고

 

그래서 추가로 검색해보니 SSL 에서 구버전 암호화 deprecate 시키듯이

SSH 에서도 ed25519 를 구버전 암호화로 사용을 막도록 기본값을 변경해서 생긴 문제인 듯.

The RSA SHA-1 hash algorithm is being quickly deprecated across operating systems and SSH clients because of various security vulnerabilities, with many of these technologies now outright denying the use of this algorithm.

It seems this has happened for the ssh client in Ubuntu 22.04. The RSA public-private key pair is considered not safe any more.

Solution
Use a more modern and secure type of key such as ed25519. Generate a new key pair in your Ubuntu 22.04 computer with this command:

ssh-keygen -t ed25519 -C "colin@colin-desktop"

[링크 : https://askubuntu.com/questions/1409105/ubuntu-22-04-ssh-the-rsa-key-isnt-working-since-upgrading-from-20-04]

[링크 : https://songs-family.tistory.com/entry/장애이슈-SSH-키-인증-방식-변경ssh-rsa-ecdsa-에-따른-서비스-장애]

 

EdDSA는 Edwards-curve 디지털 서영 알고리즘의 약자고

Ed25519는 SHA-512와 curve25519를 사용했다는데

Edwards-curve Digital Signature Algorithm (EdDSA)
Ed25519 is the EdDSA signature scheme using SHA-512 (SHA-2) and Curve25519[2] where

[링크 : https://en.wikipedia.org/wiki/EdDSA]

 

curve25519는 128bit 암호화를 제공해서 잘린건가?

In cryptography, Curve25519 is an elliptic curve used in elliptic-curve cryptography (ECC) offering 128 bits of security (256-bit key size) and designed for use with the elliptic curve Diffie–Hellman (ECDH) key agreement scheme. 

[링크 : https://en.wikipedia.org/wiki/Curve25519]

Posted by 구차니

20.10 에서 테스트 완료.

18.04 에서도 해봐야 하려나? (세션 로그아웃 시기키 귀찮은디..)

 

$ sudo vi /etc/gdm3/custom.conf
# GDM configuration storage
#
# See /usr/share/gdm/gdm.schemas for a list of available options.

[daemon]
# Uncoment the line below to force the login screen to use Xorg
WaylandEnable=false

# Enabling automatic login
#  AutomaticLoginEnable = true
#  AutomaticLogin = user1

# Enabling timed login
#  TimedLoginEnable = true
#  TimedLogin = user1
#  TimedLoginDelay = 10

AutomaticLoginEnable=True
AutomaticLogin=falinux

[security]

[xdmcp]

[chooser]

[debug]
# Uncomment the line below to turn on debugging
# More verbose logs
# Additionally lets the X server dump core if it crashes
#Enable=true


[링크 : https://www.answertopia.com/ubuntu/displaying-ubuntu-applications-remotely-x11-forwarding/]

Posted by 구차니

ssh를 통해 원격명령어 실행하려는데 watch의 경우 실행이 되지 않아 찾아보니

-t 옵션을 주어 pseudo-tty 할당하도록 하면 실행이 된다.

 

ssh -t

[링크 : https://stackoverflow.com/questions/47936491/using-watch-with-ssh]

Posted by 구차니

호스트의 키가 변경되면 ssh 로그인시 경고를 날리는데

-y 같이 해당 옵션을 무조건 yes로 무시하는게 없나 찾아보는 중

$ ssh 192.168.53.144
The authenticity of host '192.168.53.144 (192.168.53.144)' can't be established.
ECDSA key fingerprint is SHA256:
Are you sure you want to continue connecting (yes/no)?

 

개인적으로는 옵션으로 처리가능한게 깔끔해서 좋음.

$ ssh 192.168.53.144 -o StrictHostKeyChecking=no
Warning: Permanently added '192.168.53.144' (ECDSA) to the list of known hosts.
pi@192.168.53.144's password:

[링크 : https://info-lab.tistory.com/254]

Posted by 구차니

아.. 설정은 가능하구나.

 

$ sudo vim /etc/sshd_config
#Subsystem sftp /usr/lib/openssh/sftp-server
Subsystem sftp internal-sftp

[링크 : https://techglimpse.com/allow-sftp-disallow-ssh-ubuntu/]

'프로그램 사용 > ssh scp sftp' 카테고리의 다른 글

ssh 슈도 터미널 실행  (0) 2022.04.25
ssh Are you sure you want to continue connecting (yes/no)?  (0) 2022.04.25
ssh 압축전송하기  (0) 2021.12.14
ssh 원격 명령어 실행  (0) 2021.09.29
reverse ssh  (0) 2021.01.03
Posted by 구차니

거창할 것 없이 -C 옵션 하나 주면 끝! 아쉽게도 압축레벨을 정할 순 없다.

Connecting with compression
A SSH tunnel does not only have the advantage that nobody can listen in on your transfers, but also another neat feature of SSH…. compression. To add compression to your connection just add a -C to the command which you use to connect with.

ssh -C user@server.com -L 5901:192.168.0.10:5901

[링크 : https://www.axllent.org/docs/ssh-tunnels/]

 

rtl-sdr 3.2MSPS로 전송받는데 압축하고 / 안하고의 차이가 상당히 크게 나온다.

운이 좋게도 압축이 잘 되는 데이터 인 듯?

'프로그램 사용 > ssh scp sftp' 카테고리의 다른 글

ssh Are you sure you want to continue connecting (yes/no)?  (0) 2022.04.25
sshd 에서 ssh 로그인 끄고 sftp만 허용하기  (0) 2022.04.01
ssh 원격 명령어 실행  (0) 2021.09.29
reverse ssh  (0) 2021.01.03
ssh blowfish  (0) 2019.09.24
Posted by 구차니

그냥 ssh id@hostname "commands" 하면 되는 듯

예전에 찾은적이 있던 것 같기도 한데...

 

[링크 : https://stackoverflow.com/questions/18502945/how-to-execute-a-remote-command-over-ssh-with-arguments]

'프로그램 사용 > ssh scp sftp' 카테고리의 다른 글

sshd 에서 ssh 로그인 끄고 sftp만 허용하기  (0) 2022.04.01
ssh 압축전송하기  (0) 2021.12.14
reverse ssh  (0) 2021.01.03
ssh blowfish  (0) 2019.09.24
ssh tunnel proxy  (0) 2019.09.20
Posted by 구차니

회사에서 외부로 나가는건 되어도 외부에서 들어오는건 안되니까

reverse SSH로 집에 라즈베리 해놓고 연결해 두면

라즈베리 통해서 회사로 접속이 가능한건가?

 

[링크 : http://chess72.tistory.com/160]

 

+ 2021.01.12

딱히 가능한 방법은 안보이는데 -N 옵션을 주면 터널을 유지하고 명령을 보내지 않는 것으로 보인다

 

[링크 : https://fmyson.tistory.com/384]

[링크 : https://unix.stackexchange.com/questions/133863]

 

 

+

위의 내용을 자세히 읽어보니

회사에서 집으로 연결하고(집에 라즈베리로 하나 포트 열어서 포트포워딩을 해주어야 하고)

집에서는 라즈베리의 Remote port로 접속하면 끝! 이라는 것

그런데 특정 ip의 포트를 연결하는 것도 아니고

단순(?)하게 원격지에서도 sshd를 돌려서 그것으로만 연결해주는 건가?

'프로그램 사용 > ssh scp sftp' 카테고리의 다른 글

ssh 압축전송하기  (0) 2021.12.14
ssh 원격 명령어 실행  (0) 2021.09.29
ssh blowfish  (0) 2019.09.24
ssh tunnel proxy  (0) 2019.09.20
ssh remote port forwarding  (0) 2019.01.28
Posted by 구차니

-c로는 안되고

-o Cipher로는 되네

[링크 : https://www.tweaked.io/guide/scp/]

'프로그램 사용 > ssh scp sftp' 카테고리의 다른 글

ssh 원격 명령어 실행  (0) 2021.09.29
reverse ssh  (0) 2021.01.03
ssh tunnel proxy  (0) 2019.09.20
ssh remote port forwarding  (0) 2019.01.28
reverse SSH  (0) 2018.05.14
Posted by 구차니

 

[링크 : https://www.cyberciti.biz/faq/linux-unix-ssh-proxycommand-passing-through-one-host-gateway-server/]

[링크 : https://unix.stackexchange.com/questions/311650/forward-x11-through-two-ssh-tunnels]

 

 

+

예전에 내용 확인하니  X11Forwarding  옵션만 양쪽으로 되어있으면 문제 없는듯

그런 경우에도 할수 있는 방법인가 확인이 필요할듯

[링크 : https://minimonk.net/2143]

 

+

가장 위에 링크는 nc 명령을 이용해서 먼가 하려고 하는데

잘안된다. 쓰는법을 좀더 봐야 할 듯

 

+

[링크 : http://qgp9.github.io/blog/2016/03/26/ssh-proxy-jump-host]

'프로그램 사용 > ssh scp sftp' 카테고리의 다른 글

reverse ssh  (0) 2021.01.03
ssh blowfish  (0) 2019.09.24
ssh remote port forwarding  (0) 2019.01.28
reverse SSH  (0) 2018.05.14
rpi vpn client  (0) 2018.05.11
Posted by 구차니