Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

systole

macrumors member
Original poster
Mar 24, 2011
99
1
Minnesnowta
I have been using screen in the osx terminal to get serial access, using the following:

Code:
screen telnet /dev/tty.usbserial

Unfortunately I can't scrollback in screen, which makes copying long config files a process of :apple:-C, :apple:-V, and repeat. Any suggestions for native serial support in the osx terminal app WITH scrollback?
 
Try logging or pipe fitting

I have been using screen in the osx terminal to get serial access, using the following:

Code:
screen telnet /dev/tty.usbserial

Unfortunately I can't scrollback in screen, which makes copying long config files a process of :apple:-C, :apple:-V, and repeat. Any suggestions for native serial support in the osx terminal app WITH scrollback?

I do not understand why you are using screen to launch telnet instead of invoking it directly, but try using logging in screen (-L if memory serves right)

Personally I would use tee to make a copy of the output in a file and extract your config files from this file.

Also IIRC Cisco's iOS lets you save and load config files directly. I do not remember the exact syntax but try built-in help...

Hope this helps,
Trebor.
 
I have been using screen in the osx terminal to get serial access, using the following:

Code:
screen telnet /dev/tty.usbserial

Unfortunately I can't scrollback in screen, which makes copying long config files a process of :apple:-C, :apple:-V, and repeat. Any suggestions for native serial support in the osx terminal app WITH scrollback?

Are you sure thats the command you use?
Code:
screen telnet /dev/tty.usbserial
would start screen and run
Code:
telnet /dev/tty.usbserial
in it which I would expect to fail straight away as telnet doesn't deal with serial ports AFAIK.

What you probably want to use, assuming you are connecting over a serial line is
Code:
screen /dev/cu.usbserial

If you are the only serial port user on your system it probably doesn't really matter if you use cu or tty but cu is the norm when your connecting out via serial (as opposed to waiting for something to connect in).

With that out of the way I can say that screen does have a scroll back buffer. Perhaps the easiest way to use it, assuming you are using the default key bindings, is CTRL-A ESC and then use your cursor keys to scroll around. ESC again to go back to normal mode. Screen also has copy and paste support built in but you don't need to use it if you are using a modern windowing system like OSX. Remember screen was built for use on dumb terminals where, I can assure you, it's the best thing since sliced bread but thats why it emulates its own terminal within your window.

If you do want to use something built in that does't do its own terminal emulation then there is the cu command. Depending on the permissions setup you might need to be root to run it (or use sudo) - I haven't really used it under OSX.

Code:
cu -l /dev/cu.usbserial

You can drop your session with:

Code:
~.

Andrew
 
Also IIRC Cisco's iOS lets you save and load config files directly. I do not remember the exact syntax but try built-in help...

Code:
copy <src> <dest>

src or dest could be one of:

  • conf - the config saved in the routers NVRAM that is loaded to RAM on boot
  • run - the running config (i.e. the one the router is actually using atm and is stored in RAM)
  • te - the terminal
  • tftp - a tftp site
  • flash - the flash card

That's from memory and it's been a long while for me so I'd check anything you are planning on typing into a real router :)

HTH

Andrew
 
I wish someone would do a native OSX build of Putty. I'm pretty surprised it hasn't been done. Doesn't seem like it would even take much effort if you have the original linux or BSD source code as a starting point.
 
http://www.vandyke.com/products/securecrt/mac_osx.html

Best serial and terminal emulator available on the Mac. This was my one holdout from the PC world for the longest time

I just found a student pricing form buried on the site for a $20 educational license here. Will hatve to shoo them an email.


Thanks for all the replies, Guess I just need to create a basic template with ssh access enabled and a dhcp pool to enable direct ssh access. I'll have to try cu now that I have my new mac. thanks for the tip Andrew
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.