2022. 2. 15. 11:49

i.mx8 yocto linux 에서 MAC 주소를 설정하는 방법 1 (uboot)

워낙 간단한 것이라서 설명할 것도 없겠지만, h/w적으로 MAC rom 이 없거나, u-boot에서 MAC을 설정해 놓지 않으면,

보통 kernel에서 random 하게 MAC 주소를 만들어서 ethernet device를 구동하게 된다.

이렇게 되면, DHCP를 할 때, 매번 IP 주소가 변경되어, 여간 불편한 것이 아니다.

 

이를 피하려면, u-boot 에 MAC 주소를 설정하면 된다. 설정 방법은,

u-boot> setenv ethaddr "nn:nn:nn:nn:nn:nn"

u-boot> saveenv

이렇게 ethaddr를 설정하면, 커널에서 uboot 의 ethaddr 을 읽어서 ethernet device를 구동한다.

커널에서는 임의의 명령으로 다시 변경할 수도 있다.

간단한 것인데도, 찾으려면 수고스러움이 있어서 정리해서 올린다.

 

혹시 다른 사항이 필요하면, 여기를 보는 것도 좋겠다. (kernel 구성 관련)

https://community.nxp.com/t5/i-MX-Processors/How-to-disable-random-MAC-address-generation-in-Kernel/td-p/802685

 

How to disable random MAC address generation in Kernel

Hi, We want to disable random MAC address generation for Ethernet in i.MX6 BSP in our release build so that IEEE allotted MAC number is programmed without fail during product manufacturing. Usually MAC address is programmed in U-boot environment variable "

community.nxp.com

 

2021. 12. 4. 20:07

SecureCRT를 사용한 ubuntu 20.04 ssh 접속 오류 (key exchange)

세상 참 빠르게 바뀌고 있다.

Ubuntu 20.04를 설치하고, Local 에서만 작업하다, 어느날 ssh를 접속해야 할 필요가 생겼다.

Putty로는 잘 되는데, SecureCRT v7.1.3을 사용하여 접속하려니,

Key exchange failed.
No compatible key exchange method. The server supports these methods: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256

이런 오류가 발생하였다.

SSH7 로 바뀌면서 SSH6의 key 교환 방식을 disable 시켰다고 한다. (보안상의 이유)

우선은 간단하게 다시 enable 시키려면,

# vi /etc/ssh/sshd_config

맨 아래에 두줄을 추가한 후 

# for SSH6 key exchange
KexAlgorithms +diffie-hellman-group1-sha1
Ciphers +aes128-cbc

sshd 서비스를 재 가동

# systemctl restart sshd

이제 다시 ssh 접속이 가능하다.

나는 local 에서만 사용할 것이라서.... 보안상 이유를 무시하고 사용한다.

참고하시길.

첨언:

https://www.howtoforge.com/community/threads/enable-diffie-hellman-group1-sha1-on-jessie.70764/#post-337033

를 보면, 아예 이전의 Key 알고리즘이 없어서 그런 것이니, 등록하고, Key를 만들면 문제가 해결된다고 한다.

# vi /etc/ssh/sshd_config

아래 두 줄을 추가하고,

KexAlgorithms diffie-hellman-group1-sha1,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1
Ciphers 3des-cbc,blowfish-cbc,aes128-cbc,aes128-ctr,aes256-ctr

저장한 후, key를 만들고, sshd 서비스를 재시작하라고 한다. 누구 해보신 분 추가 설명 요망.

# ssh-keygen -A

# systemctl restart sshd

.끝.

2021. 5. 28. 21:39

Notepad++ 도 black theme를...

하루 종일 컴퓨터 앞에 앉아서 작업을 하니, 밝은 화면이 많이 싫다.

이제는 Notepadd++도  black으로...

찾아보니, VS2015 dark 테마가 있다. 약간 수정하여 올린다.

VS2015-Dark-modified-by-cg.xml
0.09MB