2026年8月24日月曜日

古い認証アルゴリズムの sshd を検証で起動する方法

古い認証アルゴリズムの sshd を検証で起動する方法

概要

検証用途で一時的に起動させる方法を紹介します

環境

  • Ubuntu 24.04
  • openssh-server 9.6p1

ホスト鍵作成

mkdir -p /tmp/sshd-legacy-test
if [ ! -f /tmp/sshd-legacy-test/ssh_host_rsa_key ]; then
ssh-keygen -q -t rsa -b 2048 -f /tmp/sshd-legacy-test/ssh_host_rsa_key -N ''
fi

設定ファイル作成

cat > /tmp/sshd-legacy-test/sshd_config <<'EOF'
Port 2222
ListenAddress 127.0.0.1
HostKey /tmp/sshd-legacy-test/ssh_host_rsa_key
PidFile /tmp/sshd-legacy-test/sshd.pid
LogLevel VERBOSE
UsePAM no
PasswordAuthentication no
KbdInteractiveAuthentication no
ChallengeResponseAuthentication no
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
PermitRootLogin no
AllowUsers devops

X11Forwarding no
AllowTcpForwarding no
PrintMotd no
Subsystem sftp internal-sftp

KexAlgorithms +diffie-hellman-group14-sha1
HostKeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa
EOF

設定ファイル確認

  • /usr/sbin/sshd -t -f /tmp/sshd-legacy-test/sshd_config

起動

  • /usr/sbin/sshd -D -e -f /tmp/sshd-legacy-test/sshd_config
  • ss -ltn | grep ':2222 '

停止

if [ -f /tmp/sshd-legacy-test/sshd.pid ]; then
kill "$(cat /tmp/sshd-legacy-test/sshd.pid)"
fi

2026年8月15日土曜日

キーチェインアクセスの GUI からパスワードが消せないときの対処方法

キーチェインアクセスの GUI からパスワードが消せないときの対処方法

概要

もうキーチェインアクセスはオワコンですが git などのコマンドは未だにキーチェインアクセスを参照しているのでキーチェインアクセス側に古いパスワードが残っている場合は削除しましょう

環境

  • macOS 26.5.2
  • git 2.55.0

コマンド

security delete-internet-password -s bitbucket.org  

bitbucket.org の部分は適宜変更してください

確認

security find-internet-password -s bitbucket.org

security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain. になれば削除完了です

最後に

なぜか GUI からだと削除できないというなぞの現象が発生した場合は CLI を使いましょう

2026年8月3日月曜日

Stable diffusion forge Neo を試す

Stable diffusion forge Neo を試す

概要

WAI-illustrious-SDXL v17.0 が出たのでそれを試すために forge Neo が必要だったのでインストールから試してみました

環境

  • macOS 26.5.2 (m2 pro mac mini)
  • Python 3.13.14
  • StableDiffusion webui forge Neo 2.28

Python 準備

  • pyenv install 3.13.14

プロジェクトのクローン

  • git clone https://github.com/Haoming02/sd-webui-forge-classic sd-webui-forge-neo --branch neo --depth 1
  • cd sd-webui-forge-neo
  • pyenv local 3.13.14
  • pip install uv

プロジェクトのセットアップ

  • uv venv venv --python 3.13 --seed
  • vim webui-user.sh
# export TORCH_COMMAND="pip install torch==2.12.0 torchvision==0.27.0"

export TORCH_COMMAND="pip install torch==2.12.0 torchvision==0.27.0"

webui 起動

  • chmod +x webui-user.sh
  • ./webui-user.sh

webui 動作確認

localhost:7860 にアクセスできれば OK です

モデルのダウンロードとインストール

https://civitai.red/models/827184/wai-illustrious-sdxl ここからダウンロードします
6.46GB ほどあります

ダウンロードしたら以下に配置します

ls -l sd-webui-forge-neo/models/Stable-diffusion/

モデルを再配置したら念のため webui を再起動しましょう

動作確認

再度 webui にアクセスしモデルが読み込まれていることを確認します
そしてプロンプトとパラメータを入力します

  • Steps: 15-30
  • CFG scale: 5-7
  • Sampler: Euler a
  • Size: 1024x1024
  • Positive Prompt: ,masterpiece,best quality,amazing quality,
  • Negative Prompt: bad quality,worst quality,worst detail,sketch,censor,

あとはプロンプトを適当に調整し「Generate」してください

最後に

macOS でも普通に動作しました

参考サイト