ssh를 통해 iperf3 -s 옵션으로 실행 했는데

결과 내용이 ssh 터미널을 통해 나오지 않아서 3 ai들에게 물어보니

cluade가 알려줌. 그 와중에 gemini는 도움이 안되고 chatGPT는 파일로 떨구라고 알려줌.. (야이 -_-)

 

아무튼 -t 라는 옵션을 주면 잘 나온다. 신기하네..

     -T      Disable pseudo-terminal allocation.

     -t      Force pseudo-terminal allocation.  This can be used to execute
             arbitrary screen-based programs on a remote machine, which can be
             very useful, e.g. when implementing menu services.  Multiple -t
             options force tty allocation, even if ssh has no local tty.

 

iperf3 가 취소되어 종료되고 나서 한번에 iperf3 서버쪽 결과가 나옴. 일종의 버퍼링 상태인가..

ssh localhost "iperf3 -s"  
  iperf3 -c localhost
Connecting to host localhost, port 5201
[  5] local 127.0.0.1 port 43416 connected to 127.0.0.1 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  5.94 GBytes  51.0 Gbits/sec    0   1.31 MBytes       
[  5]   1.00-2.00   sec  6.09 GBytes  52.3 Gbits/sec    0   1.31 MBytes       
[  5]   2.00-3.00   sec  5.79 GBytes  49.7 Gbits/sec    0   1.31 MBytes       
^C[  5]   3.00-3.37   sec  2.26 GBytes  51.8 Gbits/sec    0   1.31 MBytes 
iperf3: the client has terminated
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 127.0.0.1, port 43412
[  5] local 127.0.0.1 port 5201 connected to 127.0.0.1 port 43416
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  5.72 GBytes  49.1 Gbits/sec                  
[  5]   1.00-2.00   sec  6.09 GBytes  52.3 Gbits/sec                  
[  5]   2.00-3.00   sec  5.81 GBytes  49.9 Gbits/sec                  
[  5]   2.00-3.00   sec  5.81 GBytes  49.9 Gbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-3.00   sec  20.1 GBytes  57.5 Gbits/sec                  receiver
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-3.37   sec  20.1 GBytes  51.1 Gbits/sec    0             sender
[  5]   0.00-3.37   sec  0.00 Bytes  0.00 bits/sec                  receiver
iperf3: interrupt - the client has terminated

 

그 와중에 iperf3 -s 를 실행한 ssh를 종료하면 PPID 1번으로 붙어 버린다. 야이 -_-

마치 -D / --daemon 옵션을 주고 한 것 같아지냐

$ ps -ef | grep iperf3
falinux   811482       1  2 12:12 ?        00:00:02 iperf3 -s

 

딱이네.. 머지? 터미널이 없으면 자동으로 daemon 모드로 작동하나?

$ iperf3 -D -s
$ ps -ef | grep iperf3
user   811482       1  1 12:12 ?        00:00:02 iperf3 -s

 

아무튼 대망의(?) -t 옵션. 잘 된다.

ssh -t localhost "iperf3 -s"
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
 
Accepted connection from 127.0.0.1, port 60822
[  5] local 127.0.0.1 port 5201 connected to 127.0.0.1 port 60830
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  5.48 GBytes  47.0 Gbits/sec                  
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  5.48 GBytes  47.0 Gbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  7.60 GBytes  65.3 Gbits/sec                  receiver
iperf3: the client has terminated
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
iperf3 -c localhost
Connecting to host localhost, port 5201
[  5] local 127.0.0.1 port 60830 connected to 127.0.0.1 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  5.70 GBytes  49.0 Gbits/sec    0   1.25 MBytes       
^C[  5]   1.00-1.32   sec  1.90 GBytes  50.5 Gbits/sec    0   1.25 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-1.32   sec  7.60 GBytes  49.4 Gbits/sec    0             sender
[  5]   0.00-1.32   sec  0.00 Bytes  0.00 bits/sec                  receiver
iperf3: interrupt - the client has terminated

[링크 : https://stackoverflow.com/questions/42505339/why-use-t-with-ssh]

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

ssh-copy-id  (0) 2025.04.18
ssh socks proxy  (0) 2024.07.22
ssh ecdsa 미지원(ubuntu 22.04)  (0) 2023.05.30
ubuntu ssh x11 forwarding시 gnome 화면 끌어오기  (0) 2022.07.11
ssh 슈도 터미널 실행  (0) 2022.04.25
Posted by 구차니

와!! 이런 개꿀 명령어가?!?!?

직접 키 복사해서 넣어도 되지만 한번만 접속하면 알아서 복사해주니 개 꿀!

 

ssh-copy-id [-i [identity_file]] [user@]machine

[링크 : https://linux.die.net/man/1/ssh-copy-id]

 

[링크 : https://itzone.tistory.com/694]

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

ssh -t  (0) 2025.09.08
ssh socks proxy  (0) 2024.07.22
ssh ecdsa 미지원(ubuntu 22.04)  (0) 2023.05.30
ubuntu ssh x11 forwarding시 gnome 화면 끌어오기  (0) 2022.07.11
ssh 슈도 터미널 실행  (0) 2022.04.25
Posted by 구차니

예전에 해봤는데 안되길래 포기했던 녀석들..

이제는 시간이 지났으니 잘 되려나?

 

ssh -D

[링크 : https://superuser.com/questions/408031/differences-between-ssh-l-to-d]

 

wget은 socks proxy 미지원,curl 사용 필요

[링크 : https://askubuntu.com/questions/1327783/can-you-set-socks5-proxy-from-linux-command-line]

 

--proxy-server="socks5://myproxy:8080"

[링크 : https://www.chromium.org/developers/design-documents/network-stack/socks-proxy/]

 

[링크 : https://thesafety.us/proxy-setup-chrome-windows]

[링크 : https://datawookie.dev/blog/2023/12/ssh-tunnel-dynamic-port-forwarding/]

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

ssh -t  (0) 2025.09.08
ssh-copy-id  (0) 2025.04.18
ssh ecdsa 미지원(ubuntu 22.04)  (0) 2023.05.30
ubuntu ssh x11 forwarding시 gnome 화면 끌어오기  (0) 2022.07.11
ssh 슈도 터미널 실행  (0) 2022.04.25
Posted by 구차니

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 구차니