≡ Menu

Howto: Eject cd with ssh

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 user@ras.nixcraft.in
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

Share this tutorial on:
{ 2 comments… add one }
  • mygirlgames February 16, 2011, 4:18 am

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

  • HEX May 17, 2012, 8:42 am

    yeah, it was really helpful for me .

Security: Are you a robot or human?

Leave a Comment

You can use these HTML tags and attributes: <strong> <em> <pre> <code> <a href="" title="">

   Tagged with: