# Notes - VTY lines (IOS-XR)

### VTY Lines

By default, VTY lines 0-4 are available for access for virtual terminal sessions (i.e. telnet and SSH). The default line template applies to these lines.

You have the ability to control three lines:

* console
* custom (named and applied to the vty-pool)
* default
  * Attributes not defined in **line console** or **line template \<name>** are taken from **line default**

You will typically use the default line template. This does not need to be applied to the vty lines, because they use the default line template already.

```
line default
 width 256
```

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FS6XaZ4wE5HH5Iw8QK9b7%2Fimage.png?alt=media&#x26;token=ea05b2ad-6e7b-414b-9f2b-3fd21a96244d" alt=""><figcaption></figcaption></figure></div>

To create your own custom line template use **line template \<name>** and apply it to the specified vty lines via the **vty-pool** statement. You can either apply the template to the default pool (which must begin at 0), or to a user-defined pool name (which must start at vty number 5 or higher).

```
line template X
 width 312
!
vty-pool default 0 4 line-template X
```

<div align="left"><figure><img src="https://3072390383-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkUz2C3GqnZcWhoVL6jfk%2Fuploads%2FQFhpJtBIoIFRWg6hyEPL%2Fimage.png?alt=media&#x26;token=57183d0c-cd11-4119-8fb3-337f841622f1" alt=""><figcaption></figcaption></figure></div>

The **line console** template will only apply to the physical console port.

### SSH/Telnet <a href="#dfa64bea-dd15-49cd-b73c-53b0b48f60c0" id="dfa64bea-dd15-49cd-b73c-53b0b48f60c0"></a>

Note that SSH and/or telnet must be explicitly enabled:

```
ssh server [vrf <name>]
telnet [vrf <name>] ipv4|ipv6 server max-servers <num>
```

### Default vty-pool size <a href="#id-38ae6f5f-f073-4676-b04a-a1c060186791" id="id-38ae6f5f-f073-4676-b04a-a1c060186791"></a>

By default, there are 5 vty lines defined. This limits the max number of simulataneous vty sessions to five. To increase this, you can increase the default vty-pool:

```
vty-pool default 0 <4-99> [line-template <name>]
```

### Further Reading <a href="#ce70d116-1919-447d-a26f-19e1af52d08e" id="ce70d116-1919-447d-a26f-19e1af52d08e"></a>

<https://www.cisco.com/c/en/us/td/docs/routers/xr12000/software/xr12k_r3-9/system_management/configuration/guide/yc39xr12k_chapter9.html>
