Howto: Eject cd with ssh

by on February 23, 2006 · 2 comments· LAST UPDATED January 12, 2007

in , ,

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
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

Tweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?

{ 2 comments… read them below or add one }

1 mygirlgames February 16, 2011 at 4:18 am

Than’k so much for your posting. it is very useful to me.


2 HEX May 17, 2012 at 8:42 am

yeah, it was really helpful for me .


Leave a Comment

Tagged as:

Previous Faq:

Next Faq: