0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

OPX(OpenSwitch)でS6010-onの管理ポートにSSH

Last updated at Posted at 2024-10-10

前提

S6010-onにOpenSwitchOSを入れて使用しています。

OpenSwitchOSは現在メンテナンスがされていません。注意してください。
代替のOSとしてSONICがあります。

準備

マネジメントポート(Management port)にRJ45ケーブルを接続します。
2つあるうちの下側です。

statusチェック

ポートの状態を確認します。
通常マネジメントポートはeth0になります。
sudo opx-show-interfaceですべてのポートの状態を確認できますがここでは割愛します。

admin@OPX:~$ sudo ifconfig eth0
[sudo] password for admin: 
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.5.106  netmask 255.255.255.0  broadcast 192.168.5.255
        inet6 fe80::f68e:38ff:fe2b:1769  prefixlen 64  scopeid 0x20<link>
        ether f4:8e:38:2b:17:69  txqueuelen 1000  (Ethernet)
        RX packets 1055  bytes 604720 (590.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 239  bytes 24480 (23.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

192.168.5.106にDHCPからIPが降ってきていることが確認できます。

sshdの状態チェック

OPXの中身はLinuxですのでsshdが起動してることを確認します。

admin@OPX:~$ sudo systemctl status sshd
● ssh.service - OpenBSD Secure Shell server
   Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enab
led)
   Active: active (running) since Thu 2024-10-10 12:36:11 UTC; 3min 2
2s ago
  Process: 1862 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCES
S)
  Process: 1857 ExecReload=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
  Process: 521 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
 Main PID: 530 (sshd)
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/ssh.service
           └─530 /usr/sbin/sshd -D

Oct 10 12:36:11 OPX systemd[1]: Starting OpenBSD Secure Shell server...
Oct 10 12:36:11 OPX sshd[530]: Server listening on 0.0.0.0 port 22.
Oct 10 12:36:11 OPX sshd[530]: Server listening on :: port 22.
Oct 10 12:36:11 OPX systemd[1]: Started OpenBSD Secure Shell server.
Oct 10 12:36:33 OPX systemd[1]: Reloading OpenBSD Secure Shell server.
Oct 10 12:36:33 OPX sshd[530]: Received SIGHUP; restarting.
Oct 10 12:36:33 OPX systemd[1]: Reloaded OpenBSD Secure Shell server.
Oct 10 12:36:33 OPX sshd[530]: Server listening on 0.0.0.0 port 22.
Oct 10 12:36:33 OPX sshd[530]: Server listening on :: port 22.

有効になってない場合は以下のコマンドで有効にします。

sudo systemctl start sshd
sudo systemctl enable sshd

sshする

通常通りsshします。

> ssh admin@192.168.5.106
The authenticity of host '192.168.5.106 (192.168.5.106)' can't be established.
ED25519 key fingerprint is SHA256:nbuEN9mXCrR5OHF78jmk57A6+UqsJeUZdHxjY6O8o9M.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.5.106' (ED25519) to the list of known hosts.
admin@192.168.5.106's password:
Linux OPX 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Thu Oct 10 12:38:00 2024
admin@OPX:~$

うまくつながらないなと思っていたらLanケーブルの接触不良でした。
床に転がっているLanケーブルは使ってはいけません。

参考資料

ChatGPT君
Dell公式マニュアル

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?