Howto: Eject cd with ssh

Posted on in Categories , , , , last updated January 12, 2007

Eject allows removable media (typically a CD-ROM, floppy disk, tape, or JAZ or ZIP disk) to be ejected under software control. The command can also control some multi-disc CD-ROM changers, the auto-eject feature supported by some devices, and close the disc tray of some CD-ROM drives. Eject can be used remotely over ssh session to eject cds.

First login to remote system over ssh session:
$ ssh [email protected]
Eject cd using device name:
# eject /dev/cdrom
OR Eject cd using mount point
# eject /mnt/cdrom/

To close tray type command:
# eject -t /mnt/cdrom/If you have multi-disc changer then you can use eject to select disc. For example, select 4th disc on multi-disc changer:# eject -v -c4 /dev/cdrom

3 comment

Leave a Comment