How to make PuTTy window a certain size from command line?

4

I using PuTTy to SSH to a server, but I need the terminal window that opens to be small, only a certain x by x size, is there a ways to do this from command line?

CAllende

Posted 2015-01-28T23:39:10.207

Reputation: 41

Answers

6

PuTTY Standard command line parameters does not mention any options for specifying a window size or a font size.

However, you can specify a profile to load, and that can be used to accomplish what you're seeking. A profile is basically a collection of settings, including window properties, remote server name, authentication keys, and more. Some of those settings, like the server name, can be left blank if desired.

Make a profile using the GUI. To change the window size, go to the screen of Window options. (That is above the "Appearance" screen. The word "Window" is a category that is above other screens in the hierarchy. But, it is also a screen of options.) Then, after specifying the size you want, go to the "Session" screen and type in a session name, and click "Save". That creates the profile.

Then, use:

PuTTY -load "sessionName"

Customize the part after the -load and between the quotes. Specify the full path to PuTTY as required.

Some more official documentation for you: PuTTY: Specifying a session to start with.

TOOGAM

Posted 2015-01-28T23:39:10.207

Reputation: 12 651

0

As other menchion, you need to load a profile to do so. If you still want to automatically log in, put the username+password after the -load parameter like this (this is how my windows desktop shortcut looks):

C:\apps\putty.exe -ssh -P 2222 -load "PROFILE NAME" USERNAME@192.168.0.10 -pw PASSWORD

If -load is the last parameter, passing username and password does not work. The -P is only for servers not running default port 22.

nivs1978

Posted 2015-01-28T23:39:10.207

Reputation: 121

0

I don't think PuTTY supports this on the command line. You can however, setup a profile with the "Columns" & "Rows" properties set on the "Window" settings pane. You can then load the profile using:

putty -load "Profile Name"

heavyd

Posted 2015-01-28T23:39:10.207

Reputation: 54 755